").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var n=0,r;r=this.tabs[n];n++)t===!0||e.inArray(n,t)!==-1?e(r).addClass("ui-state-disabled").attr("aria-disabled","true"):e(r).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var n={click:function(e){e.preventDefault()}};t&&e.each(t.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var n,r=this.element.parent();t==="fill"?(n=r.height(),n-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),r=t.css("position");if(r==="absolute"||r==="fixed")return;n-=t.outerHeight(!0)}),this.element.children().not(this.panels).each(function(){n-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,n-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):t==="auto"&&(n=0,this.panels.each(function(){n=Math.max(n,e(this).height("").height())}).height(n))},_eventHandler:function(t){var n=this.options,r=this.active,i=e(t.currentTarget),s=i.closest("li"),o=s[0]===r[0],u=o&&n.collapsible,a=u?e():this._getPanelForTab(s),f=r.length?this._getPanelForTab(r):e(),l={oldTab:r,oldPanel:f,newTab:u?e():s,newPanel:a};t.preventDefault();if(s.hasClass("ui-state-disabled")||s.hasClass("ui-tabs-loading")||this.running||o&&!n.collapsible||this._trigger("beforeActivate",t,l)===!1)return;n.active=u?!1:this.tabs.index(s),this.active=o?e():s,this.xhr&&this.xhr.abort(),!f.length&&!a.length&&e.error("jQuery UI Tabs: Mismatching fragment identifier."),a.length&&this.load(this.tabs.index(s),t),this._toggle(t,l)},_toggle:function(t,n){function o(){r.running=!1,r._trigger("activate",t,n)}function u(){n.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),i.length&&r.options.show?r._show(i,r.options.show,o):(i.show(),o())}var r=this,i=n.newPanel,s=n.oldPanel;this.running=!0,s.length&&this.options.hide?this._hide(s,this.options.hide,function(){n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),u()}):(n.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),s.hide(),u()),s.attr({"aria-expanded":"false","aria-hidden":"true"}),n.oldTab.attr("aria-selected","false"),i.length&&s.length?n.oldTab.attr("tabIndex",-1):i.length&&this.tabs.filter(function(){return e(this).attr("tabIndex")===0}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}),n.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(t){var n,r=this._findActive(t);if(r[0]===this.active[0])return;r.length||(r=this.active),n=r.find(".ui-tabs-anchor")[0],this._eventHandler({target:n,currentTarget:n,preventDefault:e.noop})},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return typeof e=="string"&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),n=t.data("ui-tabs-aria-controls");n?t.attr("aria-controls",n).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),this.options.heightStyle!=="content"&&this.panels.css("height","")},enable:function(n){var r=this.options.disabled;if(r===!1)return;n===t?r=!1:(n=this._getIndex(n),e.isArray(r)?r=e.map(r,function(e){return e!==n?e:null}):r=e.map(this.tabs,function(e,t){return t!==n?t:null})),this._setupDisabled(r)},disable:function(n){var r=this.options.disabled;if(r===!0)return;if(n===t)r=!0;else{n=this._getIndex(n);if(e.inArray(n,r)!==-1)return;e.isArray(r)?r=e.merge([n],r).sort():r=[n]}this._setupDisabled(r)},load:function(t,n){t=this._getIndex(t);var r=this,i=this.tabs.eq(t),o=i.find(".ui-tabs-anchor"),u=this._getPanelForTab(i),a={tab:i,panel:u};if(s(o[0]))return;this.xhr=e.ajax(this._ajaxSettings(o,n,a)),this.xhr&&this.xhr.statusText!=="canceled"&&(i.addClass("ui-tabs-loading"),u.attr("aria-busy","true"),this.xhr.success(function(e){setTimeout(function(){u.html(e),r._trigger("load",n,a)},1)}).complete(function(e,t){setTimeout(function(){t==="abort"&&r.panels.stop(!1,!0),i.removeClass("ui-tabs-loading"),u.removeAttr("aria-busy"),e===r.xhr&&delete r.xhr},1)}))},_ajaxSettings:function(t,n,r){var i=this;return{url:t.attr("href"),beforeSend:function(t,s){return i._trigger("beforeLoad",n,e.extend({jqXHR:t,ajaxSettings:s},r))}}},_getPanelForTab:function(t){var n=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+n))}})})(jQuery);(function(e){function n(t,n){var r=(t.attr("aria-describedby")||"").split(/\s+/);r.push(n),t.data("ui-tooltip-id",n).attr("aria-describedby",e.trim(r.join(" ")))}function r(t){var n=t.data("ui-tooltip-id"),r=(t.attr("aria-describedby")||"").split(/\s+/),i=e.inArray(n,r);i!==-1&&r.splice(i,1),t.removeData("ui-tooltip-id"),r=e.trim(r.join(" ")),r?t.attr("aria-describedby",r):t.removeAttr("aria-describedby")}var t=0;e.widget("ui.tooltip",{version:"1.10.0",options:{content:function(){var t=e(this).attr("title")||"";return e("
").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(t,n){var r=this;if(t==="disabled"){this[n?"_disable":"_enable"](),this.options[t]=n;return}this._super(t,n),t==="content"&&e.each(this.tooltips,function(e,t){r._updateContent(t)})},_disable:function(){var t=this;e.each(this.tooltips,function(n,r){var i=e.Event("blur");i.target=i.currentTarget=r[0],t.close(i,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var n=this,r=e(t?t.target:this.element).closest(this.options.items);if(!r.length||r.data("ui-tooltip-id"))return;r.attr("title")&&r.data("ui-tooltip-title",r.attr("title")),r.data("ui-tooltip-open",!0),t&&t.type==="mouseover"&&r.parents().each(function(){var t=e(this),r;t.data("ui-tooltip-open")&&(r=e.Event("blur"),r.target=r.currentTarget=this,n.close(r,!0)),t.attr("title")&&(t.uniqueId(),n.parents[this.id]={element:this,title:t.attr("title")},t.attr("title",""))}),this._updateContent(r,t)},_updateContent:function(e,t){var n,r=this.options.content,i=this,s=t?t.type:null;if(typeof r=="string")return this._open(t,e,r);n=r.call(e[0],function(n){if(!e.data("ui-tooltip-open"))return;i._delay(function(){t&&(t.type=s),this._open(t,e,n)})}),n&&this._open(t,e,n)},_open:function(t,r,i){function f(e){a.of=e;if(s.is(":hidden"))return;s.position(a)}var s,o,u,a=e.extend({},this.options.position);if(!i)return;s=this._find(r);if(s.length){s.find(".ui-tooltip-content").html(i);return}r.is("[title]")&&(t&&t.type==="mouseover"?r.attr("title",""):r.removeAttr("title")),s=this._tooltip(r),n(r,s.attr("id")),s.find(".ui-tooltip-content").html(i),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:f}),f(t)):s.position(e.extend({of:r},this.options.position)),s.hide(),this._show(s,this.options.show),this.options.show&&this.options.show.delay&&(u=this.delayedShow=setInterval(function(){s.is(":visible")&&(f(a.of),clearInterval(u))},e.fx.interval)),this._trigger("open",t,{tooltip:s}),o={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var n=e.Event(t);n.currentTarget=r[0],this.close(n,!0)}},remove:function(){this._removeTooltip(s)}};if(!t||t.type==="mouseover")o.mouseleave="close";if(!t||t.type==="focusin")o.focusout="close";this._on(!0,r,o)},close:function(t){var n=this,i=e(t?t.currentTarget:this.element),s=this._find(i);if(this.closing)return;clearInterval(this.delayedShow),i.data("ui-tooltip-title")&&i.attr("title",i.data("ui-tooltip-title")),r(i),s.stop(!0),this._hide(s,this.options.hide,function(){n._removeTooltip(e(this))}),i.removeData("ui-tooltip-open"),this._off(i,"mouseleave focusout keyup"),i[0]!==this.element[0]&&this._off(i,"remove"),this._off(this.document,"mousemove"),t&&t.type==="mouseleave"&&e.each(this.parents,function(t,r){e(r.element).attr("title",r.title),delete n.parents[t]}),this.closing=!0,this._trigger("close",t,{tooltip:s}),this.closing=!1},_tooltip:function(n){var r="ui-tooltip-"+t++,i=e("").attr({id:r,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return e("
").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[r]=n,i},_find:function(t){var n=t.data("ui-tooltip-id");return n?e("#"+n):e()},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(n,r){var i=e.Event("blur");i.target=i.currentTarget=r[0],t.close(i,!0),e("#"+n).remove(),r.data("ui-tooltip-title")&&(r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))})}})})(jQuery);jQuery.effects||function(e,t){var n="ui-effects-";e.effects={effect:{}},function(e,t){function h(e,t,n){var r=u[t.type]||{};return e==null?n||!t.def?null:t.def:(e=r.floor?~~e:parseFloat(e),isNaN(e)?t.def:r.mod?(e+r.mod)%r.mod:0>e?0:r.max")[0],l,c=e.each;f.style.cssText="background-color:rgba(1,1,1,.5)",a.rgba=f.style.backgroundColor.indexOf("rgba")>-1,c(o,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),s.fn=e.extend(s.prototype,{parse:function(n,r,i,u){if(n===t)return this._rgba=[null,null,null,null],this;if(n.jquery||n.nodeType)n=e(n).css(r),r=t;var a=this,f=e.type(n),d=this._rgba=[];r!==t&&(n=[n,r,i,u],f="array");if(f==="string")return this.parse(p(n)||l._default);if(f==="array")return c(o.rgba.props,function(e,t){d[t.idx]=h(n[t.idx],t)}),this;if(f==="object")return n instanceof s?c(o,function(e,t){n[t.cache]&&(a[t.cache]=n[t.cache].slice())}):c(o,function(t,r){var i=r.cache;c(r.props,function(e,t){if(!a[i]&&r.to){if(e==="alpha"||n[e]==null)return;a[i]=r.to(a._rgba)}a[i][t.idx]=h(n[e],t,!0)}),a[i]&&e.inArray(null,a[i].slice(0,3))<0&&(a[i][3]=1,r.from&&(a._rgba=r.from(a[i])))}),this},is:function(e){var t=s(e),n=!0,r=this;return c(o,function(e,i){var s,o=t[i.cache];return o&&(s=r[i.cache]||i.to&&i.to(r._rgba)||[],c(i.props,function(e,t){if(o[t.idx]!=null)return n=o[t.idx]===s[t.idx],n})),n}),n},_space:function(){var e=[],t=this;return c(o,function(n,r){t[r.cache]&&e.push(n)}),e.pop()},transition:function(e,t){var n=s(e),r=n._space(),i=o[r],a=this.alpha()===0?s("transparent"):this,f=a[i.cache]||i.to(a._rgba),l=f.slice();return n=n[i.cache],c(i.props,function(e,r){var i=r.idx,s=f[i],o=n[i],a=u[r.type]||{};if(o===null)return;s===null?l[i]=o:(a.mod&&(o-s>a.mod/2?s+=a.mod:s-o>a.mod/2&&(s-=a.mod)),l[i]=h((o-s)*t+s,r))}),this[r](l)},blend:function(t){if(this._rgba[3]===1)return this;var n=this._rgba.slice(),r=n.pop(),i=s(t)._rgba;return s(e.map(n,function(e,t){return(1-r)*i[t]+r*e}))},toRgbaString:function(){var t="rgba(",n=e.map(this._rgba,function(e,t){return e==null?t>2?1:0:e});return n[3]===1&&(n.pop(),t="rgb("),t+n.join()+")"},toHslaString:function(){var t="hsla(",n=e.map(this.hsla(),function(e,t){return e==null&&(e=t>2?1:0),t&&t<3&&(e=Math.round(e*100)+"%"),e});return n[3]===1&&(n.pop(),t="hsl("),t+n.join()+")"},toHexString:function(t){var n=this._rgba.slice(),r=n.pop();return t&&n.push(~~(r*255)),"#"+e.map(n,function(e){return e=(e||0).toString(16),e.length===1?"0"+e:e}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}}),s.fn.parse.prototype=s.fn,o.hsla.to=function(e){if(e[0]==null||e[1]==null||e[2]==null)return[null,null,null,e[3]];var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=e[3],s=Math.max(t,n,r),o=Math.min(t,n,r),u=s-o,a=s+o,f=a*.5,l,c;return o===s?l=0:t===s?l=60*(n-r)/u+360:n===s?l=60*(r-t)/u+120:l=60*(t-n)/u+240,u===0?c=0:f<=.5?c=u/a:c=u/(2-a),[Math.round(l)%360,c,f,i==null?1:i]},o.hsla.from=function(e){if(e[0]==null||e[1]==null||e[2]==null)return[null,null,null,e[3]];var t=e[0]/360,n=e[1],r=e[2],i=e[3],s=r<=.5?r*(1+n):r+n-r*n,o=2*r-s;return[Math.round(d(o,s,t+1/3)*255),Math.round(d(o,s,t)*255),Math.round(d(o,s,t-1/3)*255),i]},c(o,function(n,i){var o=i.props,u=i.cache,a=i.to,f=i.from;s.fn[n]=function(n){a&&!this[u]&&(this[u]=a(this._rgba));if(n===t)return this[u].slice();var r,i=e.type(n),l=i==="array"||i==="object"?n:arguments,p=this[u].slice();return c(o,function(e,t){var n=l[i==="object"?e:t.idx];n==null&&(n=p[t.idx]),p[t.idx]=h(n,t)}),f?(r=s(f(p)),r[u]=p,r):s(p)},c(o,function(t,i){if(s.fn[t])return;s.fn[t]=function(s){var o=e.type(s),u=t==="alpha"?this._hsla?"hsla":"rgba":n,a=this[u](),f=a[i.idx],l;return o==="undefined"?f:(o==="function"&&(s=s.call(this,f),o=e.type(s)),s==null&&i.empty?this:(o==="string"&&(l=r.exec(s),l&&(s=f+parseFloat(l[2])*(l[1]==="+"?1:-1))),a[i.idx]=s,this[u](a)))}})}),s.hook=function(t){var n=t.split(" ");c(n,function(t,n){e.cssHooks[n]={set:function(t,r){var i,o,u="";if(r!=="transparent"&&(e.type(r)!=="string"||(i=p(r)))){r=s(i||r);if(!a.rgba&&r._rgba[3]!==1){o=n==="backgroundColor"?t.parentNode:t;while((u===""||u==="transparent")&&o&&o.style)try{u=e.css(o,"backgroundColor"),o=o.parentNode}catch(f){}r=r.blend(u&&u!=="transparent"?u:"_default")}r=r.toRgbaString()}try{t.style[n]=r}catch(f){}}},e.fx.step[n]=function(t){t.colorInit||(t.start=s(t.elem,n),t.end=s(t.end),t.colorInit=!0),e.cssHooks[n].set(t.elem,t.start.transition(t.end,t.pos))}})},s.hook(n),e.cssHooks.borderColor={expand:function(e){var t={};return c(["Top","Right","Bottom","Left"],function(n,r){t["border"+r+"Color"]=e}),t}},l=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(t){var n,r,i=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,s={};if(i&&i.length&&i[0]&&i[i[0]]){r=i.length;while(r--)n=i[r],typeof i[n]=="string"&&(s[e.camelCase(n)]=i[n])}else for(n in i)typeof i[n]=="string"&&(s[n]=i[n]);return s}function s(t,n){var i={},s,o;for(s in n)o=n[s],t[s]!==o&&!r[s]&&(e.fx.step[s]||!isNaN(parseFloat(o)))&&(i[s]=o);return i}var n=["add","remove","toggle"],r={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,n){e.fx.step[n]=function(e){if(e.end!=="none"&&!e.setAttr||e.pos===1&&!e.setAttr)jQuery.style(e.elem,n,e.end),e.setAttr=!0}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(t,r,o,u){var a=e.speed(r,o,u);return this.queue(function(){var r=e(this),o=r.attr("class")||"",u,f=a.children?r.find("*").addBack():r;f=f.map(function(){var t=e(this);return{el:t,start:i(this)}}),u=function(){e.each(n,function(e,n){t[n]&&r[n+"Class"](t[n])})},u(),f=f.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),r.attr("class",o),f=f.map(function(){var t=this,n=e.Deferred(),r=e.extend({},a,{queue:!1,complete:function(){n.resolve(t)}});return this.el.animate(this.diff,r),n.promise()}),e.when.apply(e,f.get()).done(function(){u(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),a.complete.call(r[0])})})},e.fn.extend({_addClass:e.fn.addClass,addClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{add:t},n,r,i):this._addClass(t)},_removeClass:e.fn.removeClass,removeClass:function(t,n,r,i){return n?e.effects.animateClass.call(this,{remove:t},n,r,i):this._removeClass(t)},_toggleClass:e.fn.toggleClass,toggleClass:function(n,r,i,s,o){return typeof r=="boolean"||r===t?i?e.effects.animateClass.call(this,r?{add:n}:{remove:n},i,s,o):this._toggleClass(n,r):e.effects.animateClass.call(this,{toggle:n},r,i,s)},switchClass:function(t,n,r,i,s){return e.effects.animateClass.call(this,{add:n,remove:t},r,i,s)}})}(),function(){function r(t,n,r,i){e.isPlainObject(t)&&(n=t,t=t.effect),t={effect:t},n==null&&(n={}),e.isFunction(n)&&(i=n,r=null,n={});if(typeof n=="number"||e.fx.speeds[n])i=r,r=n,n={};return e.isFunction(r)&&(i=r,r=null),n&&e.extend(t,n),r=r||n.duration,t.duration=e.fx.off?0:typeof r=="number"?r:r in e.fx.speeds?e.fx.speeds[r]:e.fx.speeds._default,t.complete=i||n.complete,t}function i(t){return!t||typeof t=="number"||e.fx.speeds[t]?!0:typeof t=="string"&&!e.effects.effect[t]}e.extend(e.effects,{version:"1.10.0",save:function(e,t){for(var r=0;r
").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),i={width:t.width(),height:t.height()},s=document.activeElement;try{s.id}catch(o){s=document.body}return t.wrap(r),(t[0]===s||e.contains(t[0],s))&&e(s).focus(),r=t.parent(),t.css("position")==="static"?(r.css({position:"relative"}),t.css({position:"relative"})):(e.extend(n,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,r){n[r]=t.css(r),isNaN(parseInt(n[r],10))&&(n[r]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(i),r.css(n).show()},removeWrapper:function(t){var n=document.activeElement;return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===n||e.contains(t[0],n))&&e(n).focus()),t},setTransition:function(t,n,r,i){return i=i||{},e.each(n,function(e,n){var s=t.cssUnit(n);s[0]>0&&(i[n]=s[0]*r+s[1])}),i}}),e.fn.extend({effect:function(){function o(n){function u(){e.isFunction(i)&&i.call(r[0]),e.isFunction(n)&&n()}var r=e(this),i=t.complete,o=t.mode;(r.is(":hidden")?o==="hide":o==="show")?u():s.call(r[0],t,u)}var t=r.apply(this,arguments),n=t.mode,i=t.queue,s=e.effects.effect[t.effect];return e.fx.off||!s?n?this[n](t.duration,t.complete):this.each(function(){t.complete&&t.complete.call(this)}):i===!1?this.each(o):this.queue(i||"fx",o)},_show:e.fn.show,show:function(e){if(i(e))return this._show.apply(this,arguments);var t=r.apply(this,arguments);return t.mode="show",this.effect.call(this,t)},_hide:e.fn.hide,hide:function(e){if(i(e))return this._hide.apply(this,arguments);var t=r.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)},__toggle:e.fn.toggle,toggle:function(t){if(i(t)||typeof t=="boolean"||e.isFunction(t))return this.__toggle.apply(this,arguments);var n=r.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)},cssUnit:function(t){var n=this.css(t),r=[];return e.each(["em","px","%","pt"],function(e,t){n.indexOf(t)>0&&(r=[parseFloat(n),t])}),r}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,n){t[n]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return e===0||e===1?e:-Math.pow(2,8*(e-1))*Math.sin(((e-1)*80-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){var t,n=4;while(e<((t=Math.pow(2,--n))-1)/11);return 1/Math.pow(4,3-n)-7.5625*Math.pow((t*3-2)/22-e,2)}}),e.each(t,function(t,n){e.easing["easeIn"+t]=n,e.easing["easeOut"+t]=function(e){return 1-n(1-e)},e.easing["easeInOut"+t]=function(e){return e<.5?n(e*2)/2:1-n(e*-2+2)/2}})}()}(jQuery);(function(e,t){var n=/up|down|vertical/,r=/up|left|vertical|horizontal/;e.effects.effect.blind=function(t,i){var s=e(this),o=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(s,t.mode||"hide"),a=t.direction||"up",f=n.test(a),l=f?"height":"width",c=f?"top":"left",h=r.test(a),p={},d=u==="show",v,m,g;s.parent().is(".ui-effects-wrapper")?e.effects.save(s.parent(),o):e.effects.save(s,o),s.show(),v=e.effects.createWrapper(s).css({overflow:"hidden"}),m=v[l](),g=parseFloat(v.css(c))||0,p[l]=d?m:0,h||(s.css(f?"bottom":"right",0).css(f?"top":"left","auto").css({position:"absolute"}),p[c]=d?g:m+g),d&&(v.css(l,0),h||v.css(c,g+m)),v.animate(p,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){u==="hide"&&s.hide(),e.effects.restore(s,o),e.effects.removeWrapper(s),i()}})}})(jQuery);(function(e,t){e.effects.effect.bounce=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"effect"),o=s==="hide",u=s==="show",a=t.direction||"up",f=t.distance,l=t.times||5,c=l*2+(u||o?1:0),h=t.duration/c,p=t.easing,d=a==="up"||a==="down"?"top":"left",v=a==="up"||a==="left",m,g,y,b=r.queue(),w=b.length;(u||o)&&i.push("opacity"),e.effects.save(r,i),r.show(),e.effects.createWrapper(r),f||(f=r[d==="top"?"outerHeight":"outerWidth"]()/3),u&&(y={opacity:1},y[d]=0,r.css("opacity",0).css(d,v?-f*2:f*2).animate(y,h,p)),o&&(f/=Math.pow(2,l-1)),y={},y[d]=0;for(m=0;m
1&&b.splice.apply(b,[1,0].concat(b.splice(w,c+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.clip=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=t.direction||"vertical",a=u==="vertical",f=a?"height":"width",l=a?"top":"left",c={},h,p,d;e.effects.save(r,i),r.show(),h=e.effects.createWrapper(r).css({overflow:"hidden"}),p=r[0].tagName==="IMG"?h:r,d=p[f](),o&&(p.css(f,0),p.css(l,d/2)),c[f]=o?d:0,c[l]=o?0:d/2,p.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){o||r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.drop=function(t,n){var r=e(this),i=["position","top","bottom","left","right","opacity","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=t.direction||"left",a=u==="up"||u==="down"?"top":"left",f=u==="up"||u==="left"?"pos":"neg",l={opacity:o?1:0},c;e.effects.save(r,i),r.show(),e.effects.createWrapper(r),c=t.distance||r[a==="top"?"outerHeight":"outerWidth"](!0)/2,o&&r.css("opacity",0).css(a,f==="pos"?-c:c),l[a]=(o?f==="pos"?"+=":"-=":f==="pos"?"-=":"+=")+c,r.animate(l,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.explode=function(t,n){function y(){c.push(this),c.length===r*i&&b()}function b(){s.css({visibility:"visible"}),e(c).remove(),u||s.hide(),n()}var r=t.pieces?Math.round(Math.sqrt(t.pieces)):3,i=r,s=e(this),o=e.effects.setMode(s,t.mode||"hide"),u=o==="show",a=s.show().css("visibility","hidden").offset(),f=Math.ceil(s.outerWidth()/i),l=Math.ceil(s.outerHeight()/r),c=[],h,p,d,v,m,g;for(h=0;h ").css({position:"absolute",visibility:"visible",left:-p*f,top:-h*l}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:f,height:l,left:d+(u?m*f:0),top:v+(u?g*l:0),opacity:u?0:1}).animate({left:d+(u?0:m*f),top:v+(u?0:g*l),opacity:u?1:0},t.duration||500,t.easing,y)}}})(jQuery);(function(e,t){e.effects.effect.fade=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"toggle");r.animate({opacity:i},{queue:!1,duration:t.duration,easing:t.easing,complete:n})}})(jQuery);(function(e,t){e.effects.effect.fold=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"hide"),o=s==="show",u=s==="hide",a=t.size||15,f=/([0-9]+)%/.exec(a),l=!!t.horizFirst,c=o!==l,h=c?["width","height"]:["height","width"],p=t.duration/2,d,v,m={},g={};e.effects.save(r,i),r.show(),d=e.effects.createWrapper(r).css({overflow:"hidden"}),v=c?[d.width(),d.height()]:[d.height(),d.width()],f&&(a=parseInt(f[1],10)/100*v[u?0:1]),o&&d.css(l?{height:0,width:a}:{height:a,width:0}),m[h[0]]=o?v[0]:a,g[h[1]]=o?v[1]:0,d.animate(m,p,t.easing).animate(g,p,t.easing,function(){u&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()})}})(jQuery);(function(e,t){e.effects.effect.highlight=function(t,n){var r=e(this),i=["backgroundImage","backgroundColor","opacity"],s=e.effects.setMode(r,t.mode||"show"),o={backgroundColor:r.css("backgroundColor")};s==="hide"&&(o.opacity=0),e.effects.save(r,i),r.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),n()}})}})(jQuery);(function(e,t){e.effects.effect.pulsate=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"show"),s=i==="show",o=i==="hide",u=s||i==="hide",a=(t.times||5)*2+(u?1:0),f=t.duration/a,l=0,c=r.queue(),h=c.length,p;if(s||!r.is(":visible"))r.css("opacity",0).show(),l=1;for(p=1;p1&&c.splice.apply(c,[1,0].concat(c.splice(h,a+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.puff=function(t,n){var r=e(this),i=e.effects.setMode(r,t.mode||"hide"),s=i==="hide",o=parseInt(t.percent,10)||150,u=o/100,a={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:i,complete:n,percent:s?o:100,from:s?a:{height:a.height*u,width:a.width*u,outerHeight:a.outerHeight*u,outerWidth:a.outerWidth*u}}),r.effect(t)},e.effects.effect.scale=function(t,n){var r=e(this),i=e.extend(!0,{},t),s=e.effects.setMode(r,t.mode||"effect"),o=parseInt(t.percent,10)||(parseInt(t.percent,10)===0?0:s==="hide"?0:100),u=t.direction||"both",a=t.origin,f={height:r.height(),width:r.width(),outerHeight:r.outerHeight(),outerWidth:r.outerWidth()},l={y:u!=="horizontal"?o/100:1,x:u!=="vertical"?o/100:1};i.effect="size",i.queue=!1,i.complete=n,s!=="effect"&&(i.origin=a||["middle","center"],i.restore=!0),i.from=t.from||(s==="show"?{height:0,width:0,outerHeight:0,outerWidth:0}:f),i.to={height:f.height*l.y,width:f.width*l.x,outerHeight:f.outerHeight*l.y,outerWidth:f.outerWidth*l.x},i.fade&&(s==="show"&&(i.from.opacity=0,i.to.opacity=1),s==="hide"&&(i.from.opacity=1,i.to.opacity=0)),r.effect(i)},e.effects.effect.size=function(t,n){var r,i,s,o=e(this),u=["position","top","bottom","left","right","width","height","overflow","opacity"],a=["position","top","bottom","left","right","overflow","opacity"],f=["width","height","overflow"],l=["fontSize"],c=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],h=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(o,t.mode||"effect"),d=t.restore||p!=="effect",v=t.scale||"both",m=t.origin||["middle","center"],g=o.css("position"),y=d?u:a,b={height:0,width:0,outerHeight:0,outerWidth:0};p==="show"&&o.show(),r={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},t.mode==="toggle"&&p==="show"?(o.from=t.to||b,o.to=t.from||r):(o.from=t.from||(p==="show"?b:r),o.to=t.to||(p==="hide"?b:r)),s={from:{y:o.from.height/r.height,x:o.from.width/r.width},to:{y:o.to.height/r.height,x:o.to.width/r.width}};if(v==="box"||v==="both")s.from.y!==s.to.y&&(y=y.concat(c),o.from=e.effects.setTransition(o,c,s.from.y,o.from),o.to=e.effects.setTransition(o,c,s.to.y,o.to)),s.from.x!==s.to.x&&(y=y.concat(h),o.from=e.effects.setTransition(o,h,s.from.x,o.from),o.to=e.effects.setTransition(o,h,s.to.x,o.to));(v==="content"||v==="both")&&s.from.y!==s.to.y&&(y=y.concat(l).concat(f),o.from=e.effects.setTransition(o,l,s.from.y,o.from),o.to=e.effects.setTransition(o,l,s.to.y,o.to)),e.effects.save(o,y),o.show(),e.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),m&&(i=e.effects.getBaseline(m,r),o.from.top=(r.outerHeight-o.outerHeight())*i.y,o.from.left=(r.outerWidth-o.outerWidth())*i.x,o.to.top=(r.outerHeight-o.to.outerHeight)*i.y,o.to.left=(r.outerWidth-o.to.outerWidth)*i.x),o.css(o.from);if(v==="content"||v==="both")c=c.concat(["marginTop","marginBottom"]).concat(l),h=h.concat(["marginLeft","marginRight"]),f=u.concat(c).concat(h),o.find("*[width]").each(function(){var n=e(this),r={height:n.height(),width:n.width(),outerHeight:n.outerHeight(),outerWidth:n.outerWidth()};d&&e.effects.save(n,f),n.from={height:r.height*s.from.y,width:r.width*s.from.x,outerHeight:r.outerHeight*s.from.y,outerWidth:r.outerWidth*s.from.x},n.to={height:r.height*s.to.y,width:r.width*s.to.x,outerHeight:r.height*s.to.y,outerWidth:r.width*s.to.x},s.from.y!==s.to.y&&(n.from=e.effects.setTransition(n,c,s.from.y,n.from),n.to=e.effects.setTransition(n,c,s.to.y,n.to)),s.from.x!==s.to.x&&(n.from=e.effects.setTransition(n,h,s.from.x,n.from),n.to=e.effects.setTransition(n,h,s.to.x,n.to)),n.css(n.from),n.animate(n.to,t.duration,t.easing,function(){d&&e.effects.restore(n,f)})});o.animate(o.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){o.to.opacity===0&&o.css("opacity",o.from.opacity),p==="hide"&&o.hide(),e.effects.restore(o,y),d||(g==="static"?o.css({position:"relative",top:o.to.top,left:o.to.left}):e.each(["top","left"],function(e,t){o.css(t,function(t,n){var r=parseInt(n,10),i=e?o.to.left:o.to.top;return n==="auto"?i+"px":r+i+"px"})})),e.effects.removeWrapper(o),n()}})}})(jQuery);(function(e,t){e.effects.effect.shake=function(t,n){var r=e(this),i=["position","top","bottom","left","right","height","width"],s=e.effects.setMode(r,t.mode||"effect"),o=t.direction||"left",u=t.distance||20,a=t.times||3,f=a*2+1,l=Math.round(t.duration/f),c=o==="up"||o==="down"?"top":"left",h=o==="up"||o==="left",p={},d={},v={},m,g=r.queue(),y=g.length;e.effects.save(r,i),r.show(),e.effects.createWrapper(r),p[c]=(h?"-=":"+=")+u,d[c]=(h?"+=":"-=")+u*2,v[c]=(h?"-=":"+=")+u*2,r.animate(p,l,t.easing);for(m=1;m1&&g.splice.apply(g,[1,0].concat(g.splice(y,f+1))),r.dequeue()}})(jQuery);(function(e,t){e.effects.effect.slide=function(t,n){var r=e(this),i=["position","top","bottom","left","right","width","height"],s=e.effects.setMode(r,t.mode||"show"),o=s==="show",u=t.direction||"left",a=u==="up"||u==="down"?"top":"left",f=u==="up"||u==="left",l,c={};e.effects.save(r,i),r.show(),l=t.distance||r[a==="top"?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(r).css({overflow:"hidden"}),o&&r.css(a,f?isNaN(l)?"-"+l:-l:l),c[a]=(o?f?"+=":"-=":f?"-=":"+=")+l,r.animate(c,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){s==="hide"&&r.hide(),e.effects.restore(r,i),e.effects.removeWrapper(r),n()}})}})(jQuery);(function(e,t){e.effects.effect.transfer=function(t,n){var r=e(this),i=e(t.to),s=i.css("position")==="fixed",o=e("body"),u=s?o.scrollTop():0,a=s?o.scrollLeft():0,f=i.offset(),l={top:f.top-u,left:f.left-a,height:i.innerHeight(),width:i.innerWidth()},c=r.offset(),h=e("").appendTo(document.body).addClass(t.className).css({top:c.top-u,left:c.left-a,height:r.innerHeight(),width:r.innerWidth(),position:s?"fixed":"absolute"}).animate(l,t.duration,t.easing,function(){h.remove(),n()})}})(jQuery);
\ No newline at end of file
diff --git a/assets/js/jquery.js b/assets/js/jquery.js
new file mode 100644
index 00000000..50d1b22f
--- /dev/null
+++ b/assets/js/jquery.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.9.0 | (c) 2005, 2012 jQuery Foundation, Inc. | jquery.org/license */(function(e,t){"use strict";function n(e){var t=e.length,n=st.type(e);return st.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e){var t=Tt[e]={};return st.each(e.match(lt)||[],function(e,n){t[n]=!0}),t}function i(e,n,r,i){if(st.acceptData(e)){var o,a,s=st.expando,u="string"==typeof n,l=e.nodeType,c=l?st.cache:e,f=l?e[s]:e[s]&&s;if(f&&c[f]&&(i||c[f].data)||!u||r!==t)return f||(l?e[s]=f=K.pop()||st.guid++:f=s),c[f]||(c[f]={},l||(c[f].toJSON=st.noop)),("object"==typeof n||"function"==typeof n)&&(i?c[f]=st.extend(c[f],n):c[f].data=st.extend(c[f].data,n)),o=c[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[st.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[st.camelCase(n)])):a=o,a}}function o(e,t,n){if(st.acceptData(e)){var r,i,o,a=e.nodeType,u=a?st.cache:e,l=a?e[st.expando]:st.expando;if(u[l]){if(t&&(r=n?u[l]:u[l].data)){st.isArray(t)?t=t.concat(st.map(t,st.camelCase)):t in r?t=[t]:(t=st.camelCase(t),t=t in r?[t]:t.split(" "));for(i=0,o=t.length;o>i;i++)delete r[t[i]];if(!(n?s:st.isEmptyObject)(r))return}(n||(delete u[l].data,s(u[l])))&&(a?st.cleanData([e],!0):st.support.deleteExpando||u!=u.window?delete u[l]:u[l]=null)}}}function a(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(Nt,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:wt.test(r)?st.parseJSON(r):r}catch(o){}st.data(e,n,r)}else r=t}return r}function s(e){var t;for(t in e)if(("data"!==t||!st.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function u(){return!0}function l(){return!1}function c(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function f(e,t,n){if(t=t||0,st.isFunction(t))return st.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return st.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=st.grep(e,function(e){return 1===e.nodeType});if(Wt.test(t))return st.filter(t,r,!n);t=st.filter(t,r)}return st.grep(e,function(e){return st.inArray(e,t)>=0===n})}function p(e){var t=zt.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function d(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function h(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function g(e){var t=nn.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function m(e,t){for(var n,r=0;null!=(n=e[r]);r++)st._data(n,"globalEval",!t||st._data(t[r],"globalEval"))}function y(e,t){if(1===t.nodeType&&st.hasData(e)){var n,r,i,o=st._data(e),a=st._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)st.event.add(t,n,s[n][r])}a.data&&(a.data=st.extend({},a.data))}}function v(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!st.support.noCloneEvent&&t[st.expando]){r=st._data(t);for(i in r.events)st.removeEvent(t,i,r.handle);t.removeAttribute(st.expando)}"script"===n&&t.text!==e.text?(h(t).text=e.text,g(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),st.support.html5Clone&&e.innerHTML&&!st.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Zt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function b(e,n){var r,i,o=0,a=e.getElementsByTagName!==t?e.getElementsByTagName(n||"*"):e.querySelectorAll!==t?e.querySelectorAll(n||"*"):t;if(!a)for(a=[],r=e.childNodes||e;null!=(i=r[o]);o++)!n||st.nodeName(i,n)?a.push(i):st.merge(a,b(i,n));return n===t||n&&st.nodeName(e,n)?st.merge([e],a):a}function x(e){Zt.test(e.type)&&(e.defaultChecked=e.checked)}function T(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Nn.length;i--;)if(t=Nn[i]+n,t in e)return t;return r}function w(e,t){return e=t||e,"none"===st.css(e,"display")||!st.contains(e.ownerDocument,e)}function N(e,t){for(var n,r=[],i=0,o=e.length;o>i;i++)n=e[i],n.style&&(r[i]=st._data(n,"olddisplay"),t?(r[i]||"none"!==n.style.display||(n.style.display=""),""===n.style.display&&w(n)&&(r[i]=st._data(n,"olddisplay",S(n.nodeName)))):r[i]||w(n)||st._data(n,"olddisplay",st.css(n,"display")));for(i=0;o>i;i++)n=e[i],n.style&&(t&&"none"!==n.style.display&&""!==n.style.display||(n.style.display=t?r[i]||"":"none"));return e}function C(e,t,n){var r=mn.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function k(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=st.css(e,n+wn[o],!0,i)),r?("content"===n&&(a-=st.css(e,"padding"+wn[o],!0,i)),"margin"!==n&&(a-=st.css(e,"border"+wn[o]+"Width",!0,i))):(a+=st.css(e,"padding"+wn[o],!0,i),"padding"!==n&&(a+=st.css(e,"border"+wn[o]+"Width",!0,i)));return a}function E(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=ln(e),a=st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=un(e,t,o),(0>i||null==i)&&(i=e.style[t]),yn.test(i))return i;r=a&&(st.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+k(e,t,n||(a?"border":"content"),r,o)+"px"}function S(e){var t=V,n=bn[e];return n||(n=A(e,t),"none"!==n&&n||(cn=(cn||st("").css("cssText","display:block !important")).appendTo(t.documentElement),t=(cn[0].contentWindow||cn[0].contentDocument).document,t.write(""),t.close(),n=A(e,t),cn.detach()),bn[e]=n),n}function A(e,t){var n=st(t.createElement(e)).appendTo(t.body),r=st.css(n[0],"display");return n.remove(),r}function j(e,t,n,r){var i;if(st.isArray(t))st.each(t,function(t,i){n||kn.test(e)?r(e,i):j(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==st.type(t))r(e,t);else for(i in t)j(e+"["+i+"]",t[i],n,r)}function D(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(lt)||[];if(st.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function L(e,n,r,i){function o(u){var l;return a[u]=!0,st.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||s||a[c]?s?!(l=c):t:(n.dataTypes.unshift(c),o(c),!1)}),l}var a={},s=e===$n;return o(n.dataTypes[0])||!a["*"]&&o("*")}function H(e,n){var r,i,o=st.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((o[r]?e:i||(i={}))[r]=n[r]);return i&&st.extend(!0,e,i),e}function M(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(o in c)o in r&&(n[c[o]]=r[o]);for(;"*"===l[0];)l.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("Content-Type"));if(i)for(o in u)if(u[o]&&u[o].test(i)){l.unshift(o);break}if(l[0]in r)a=l[0];else{for(o in r){if(!l[0]||e.converters[o+" "+l[0]]){a=o;break}s||(s=o)}a=a||s}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function q(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=u[++s];)if("*"!==i){if("*"!==l&&l!==i){if(n=a[l+" "+i]||a["* "+i],!n)for(r in a)if(o=r.split(" "),o[1]===i&&(n=a[l+" "+o[0]]||a["* "+o[0]])){n===!0?n=a[r]:a[r]!==!0&&(i=o[0],u.splice(s--,0,i));break}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(c){return{state:"parsererror",error:n?c:"No conversion from "+l+" to "+i}}}l=i}return{state:"success",data:t}}function _(){try{return new e.XMLHttpRequest}catch(t){}}function F(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function O(){return setTimeout(function(){Qn=t}),Qn=st.now()}function B(e,t){st.each(t,function(t,n){for(var r=(rr[t]||[]).concat(rr["*"]),i=0,o=r.length;o>i;i++)if(r[i].call(e,t,n))return})}function P(e,t,n){var r,i,o=0,a=nr.length,s=st.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Qn||O(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;u>a;a++)l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:st.extend({},t),opts:st.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Qn||O(),duration:n.duration,tweens:[],createTween:function(t,n){var r=st.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(R(c,l.opts.specialEasing);a>o;o++)if(r=nr[o].call(l,e,c,l.opts))return r;return B(l,c),st.isFunction(l.opts.start)&&l.opts.start.call(e,l),st.fx.timer(st.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function R(e,t){var n,r,i,o,a;for(n in e)if(r=st.camelCase(n),i=t[r],o=e[n],st.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=st.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function W(e,t,n){var r,i,o,a,s,u,l,c,f,p=this,d=e.style,h={},g=[],m=e.nodeType&&w(e);n.queue||(c=st._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,f=c.empty.fire,c.empty.fire=function(){c.unqueued||f()}),c.unqueued++,p.always(function(){p.always(function(){c.unqueued--,st.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===st.css(e,"display")&&"none"===st.css(e,"float")&&(st.support.inlineBlockNeedsLayout&&"inline"!==S(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",st.support.shrinkWrapBlocks||p.done(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(r in t)if(o=t[r],Zn.exec(o)){if(delete t[r],u=u||"toggle"===o,o===(m?"hide":"show"))continue;g.push(r)}if(a=g.length){s=st._data(e,"fxshow")||st._data(e,"fxshow",{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?st(e).show():p.done(function(){st(e).hide()}),p.done(function(){var t;st._removeData(e,"fxshow");for(t in h)st.style(e,t,h[t])});for(r=0;a>r;r++)i=g[r],l=p.createTween(i,m?s[i]:0),h[i]=s[i]||st.style(e,i),i in s||(s[i]=l.start,m&&(l.end=l.start,l.start="width"===i||"height"===i?1:0))}}function $(e,t,n,r,i){return new $.prototype.init(e,t,n,r,i)}function I(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=wn[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function z(e){return st.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var X,U,V=e.document,Y=e.location,J=e.jQuery,G=e.$,Q={},K=[],Z="1.9.0",et=K.concat,tt=K.push,nt=K.slice,rt=K.indexOf,it=Q.toString,ot=Q.hasOwnProperty,at=Z.trim,st=function(e,t){return new st.fn.init(e,t,X)},ut=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,lt=/\S+/g,ct=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ft=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,pt=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,dt=/^[\],:{}\s]*$/,ht=/(?:^|:|,)(?:\s*\[)+/g,gt=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,mt=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,yt=/^-ms-/,vt=/-([\da-z])/gi,bt=function(e,t){return t.toUpperCase()},xt=function(){V.addEventListener?(V.removeEventListener("DOMContentLoaded",xt,!1),st.ready()):"complete"===V.readyState&&(V.detachEvent("onreadystatechange",xt),st.ready())};st.fn=st.prototype={jquery:Z,constructor:st,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:ft.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof st?n[0]:n,st.merge(this,st.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:V,!0)),pt.test(i[1])&&st.isPlainObject(n))for(i in n)st.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=V.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=V,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):st.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),st.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return nt.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=st.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return st.each(this,e,t)},ready:function(e){return st.ready.promise().done(e),this},slice:function(){return this.pushStack(nt.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(st.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:tt,sort:[].sort,splice:[].splice},st.fn.init.prototype=st.fn,st.extend=st.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||st.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(e=arguments[u]))for(n in e)r=s[n],i=e[n],s!==i&&(c&&i&&(st.isPlainObject(i)||(o=st.isArray(i)))?(o?(o=!1,a=r&&st.isArray(r)?r:[]):a=r&&st.isPlainObject(r)?r:{},s[n]=st.extend(c,a,i)):i!==t&&(s[n]=i));return s},st.extend({noConflict:function(t){return e.$===st&&(e.$=G),t&&e.jQuery===st&&(e.jQuery=J),st},isReady:!1,readyWait:1,holdReady:function(e){e?st.readyWait++:st.ready(!0)},ready:function(e){if(e===!0?!--st.readyWait:!st.isReady){if(!V.body)return setTimeout(st.ready);st.isReady=!0,e!==!0&&--st.readyWait>0||(U.resolveWith(V,[st]),st.fn.trigger&&st(V).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===st.type(e)},isArray:Array.isArray||function(e){return"array"===st.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?Q[it.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==st.type(e)||e.nodeType||st.isWindow(e))return!1;try{if(e.constructor&&!ot.call(e,"constructor")&&!ot.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||ot.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||V;var r=pt.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=st.buildFragment([e],t,i),i&&st(i).remove(),st.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=st.trim(n),n&&dt.test(n.replace(gt,"@").replace(mt,"]").replace(ht,"")))?Function("return "+n)():(st.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||st.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&st.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(yt,"ms-").replace(vt,bt)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,r){var i,o=0,a=e.length,s=n(e);if(r){if(s)for(;a>o&&(i=t.apply(e[o],r),i!==!1);o++);else for(o in e)if(i=t.apply(e[o],r),i===!1)break}else if(s)for(;a>o&&(i=t.call(e[o],o,e[o]),i!==!1);o++);else for(o in e)if(i=t.call(e[o],o,e[o]),i===!1)break;return e},trim:at&&!at.call("\ufeff\u00a0")?function(e){return null==e?"":at.call(e)}:function(e){return null==e?"":(e+"").replace(ct,"")},makeArray:function(e,t){var r=t||[];return null!=e&&(n(Object(e))?st.merge(r,"string"==typeof e?[e]:e):tt.call(r,e)),r},inArray:function(e,t,n){var r;if(t){if(rt)return rt.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else for(;n[o]!==t;)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,r){var i,o=0,a=e.length,s=n(e),u=[];if(s)for(;a>o;o++)i=t(e[o],o,r),null!=i&&(u[u.length]=i);else for(o in e)i=t(e[o],o,r),null!=i&&(u[u.length]=i);return et.apply([],u)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(r=e[n],n=e,e=r),st.isFunction(e)?(i=nt.call(arguments,2),o=function(){return e.apply(n||this,i.concat(nt.call(arguments)))},o.guid=e.guid=e.guid||st.guid++,o):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===st.type(r)){o=!0;for(u in r)st.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,st.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(st(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),st.ready.promise=function(t){if(!U)if(U=st.Deferred(),"complete"===V.readyState)setTimeout(st.ready);else if(V.addEventListener)V.addEventListener("DOMContentLoaded",xt,!1),e.addEventListener("load",st.ready,!1);else{V.attachEvent("onreadystatechange",xt),e.attachEvent("onload",st.ready);var n=!1;try{n=null==e.frameElement&&V.documentElement}catch(r){}n&&n.doScroll&&function i(){if(!st.isReady){try{n.doScroll("left")}catch(e){return setTimeout(i,50)}st.ready()}}()}return U.promise(t)},st.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){Q["[object "+t+"]"]=t.toLowerCase()}),X=st(V);var Tt={};st.Callbacks=function(e){e="string"==typeof e?Tt[e]||r(e):st.extend({},e);var n,i,o,a,s,u,l=[],c=!e.once&&[],f=function(t){for(n=e.memory&&t,i=!0,u=a||0,a=0,s=l.length,o=!0;l&&s>u;u++)if(l[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}o=!1,l&&(c?c.length&&f(c.shift()):n?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function r(t){st.each(t,function(t,n){var i=st.type(n);"function"===i?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==i&&r(n)})})(arguments),o?s=l.length:n&&(a=t,f(n))}return this},remove:function(){return l&&st.each(arguments,function(e,t){for(var n;(n=st.inArray(t,l,n))>-1;)l.splice(n,1),o&&(s>=n&&s--,u>=n&&u--)}),this},has:function(e){return st.inArray(e,l)>-1},empty:function(){return l=[],this},disable:function(){return l=c=n=t,this},disabled:function(){return!l},lock:function(){return c=t,n||p.disable(),this},locked:function(){return!c},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!l||i&&!c||(o?c.push(t):f(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},st.extend({Deferred:function(e){var t=[["resolve","done",st.Callbacks("once memory"),"resolved"],["reject","fail",st.Callbacks("once memory"),"rejected"],["notify","progress",st.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return st.Deferred(function(n){st.each(t,function(t,o){var a=o[0],s=st.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&st.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?st.extend(e,r):r}},i={};return r.pipe=r.then,st.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=nt.call(arguments),a=o.length,s=1!==a||e&&st.isFunction(e.promise)?a:0,u=1===s?e:st.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?nt.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=Array(a),n=Array(a),r=Array(a);a>i;i++)o[i]&&st.isFunction(o[i].promise)?o[i].promise().done(l(i,r,o)).fail(u.reject).progress(l(i,n,t)):--s;return s||u.resolveWith(r,o),u.promise()}}),st.support=function(){var n,r,i,o,a,s,u,l,c,f,p=V.createElement("div");if(p.setAttribute("className","t"),p.innerHTML=" a",r=p.getElementsByTagName("*"),i=p.getElementsByTagName("a")[0],!r||!i||!r.length)return{};o=V.createElement("select"),a=o.appendChild(V.createElement("option")),s=p.getElementsByTagName("input")[0],i.style.cssText="top:1px;float:left;opacity:.5",n={getSetAttribute:"t"!==p.className,leadingWhitespace:3===p.firstChild.nodeType,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(i.getAttribute("style")),hrefNormalized:"/a"===i.getAttribute("href"),opacity:/^0.5/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:!!s.value,optSelected:a.selected,enctype:!!V.createElement("form").enctype,html5Clone:"<:nav>"!==V.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===V.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},s.checked=!0,n.noCloneChecked=s.cloneNode(!0).checked,o.disabled=!0,n.optDisabled=!a.disabled;try{delete p.test}catch(d){n.deleteExpando=!1}s=V.createElement("input"),s.setAttribute("value",""),n.input=""===s.getAttribute("value"),s.value="t",s.setAttribute("type","radio"),n.radioValue="t"===s.value,s.setAttribute("checked","t"),s.setAttribute("name","t"),u=V.createDocumentFragment(),u.appendChild(s),n.appendChecked=s.checked,n.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,p.attachEvent&&(p.attachEvent("onclick",function(){n.noCloneEvent=!1}),p.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})p.setAttribute(l="on"+f,"t"),n[f+"Bubbles"]=l in e||p.attributes[l].expando===!1;return p.style.backgroundClip="content-box",p.cloneNode(!0).style.backgroundClip="",n.clearCloneStyle="content-box"===p.style.backgroundClip,st(function(){var r,i,o,a="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",s=V.getElementsByTagName("body")[0];s&&(r=V.createElement("div"),r.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(r).appendChild(p),p.innerHTML="
",o=p.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",c=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",n.reliableHiddenOffsets=c&&0===o[0].offsetHeight,p.innerHTML="",p.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",n.boxSizing=4===p.offsetWidth,n.doesNotIncludeMarginInBodyOffset=1!==s.offsetTop,e.getComputedStyle&&(n.pixelPosition="1%"!==(e.getComputedStyle(p,null)||{}).top,n.boxSizingReliable="4px"===(e.getComputedStyle(p,null)||{width:"4px"}).width,i=p.appendChild(V.createElement("div")),i.style.cssText=p.style.cssText=a,i.style.marginRight=i.style.width="0",p.style.width="1px",n.reliableMarginRight=!parseFloat((e.getComputedStyle(i,null)||{}).marginRight)),p.style.zoom!==t&&(p.innerHTML="",p.style.cssText=a+"width:1px;padding:1px;display:inline;zoom:1",n.inlineBlockNeedsLayout=3===p.offsetWidth,p.style.display="block",p.innerHTML="
",p.firstChild.style.width="5px",n.shrinkWrapBlocks=3!==p.offsetWidth,s.style.zoom=1),s.removeChild(r),r=p=o=i=null)}),r=o=u=a=i=s=null,n}();var wt=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Nt=/([A-Z])/g;st.extend({cache:{},expando:"jQuery"+(Z+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?st.cache[e[st.expando]]:e[st.expando],!!e&&!s(e)},data:function(e,t,n){return i(e,t,n,!1)},removeData:function(e,t){return o(e,t,!1)},_data:function(e,t,n){return i(e,t,n,!0)},_removeData:function(e,t){return o(e,t,!0)},acceptData:function(e){var t=e.nodeName&&st.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),st.fn.extend({data:function(e,n){var r,i,o=this[0],s=0,u=null;if(e===t){if(this.length&&(u=st.data(o),1===o.nodeType&&!st._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>s;s++)i=r[s].name,i.indexOf("data-")||(i=st.camelCase(i.substring(5)),a(o,i,u[i]));st._data(o,"parsedAttrs",!0)}return u}return"object"==typeof e?this.each(function(){st.data(this,e)}):st.access(this,function(n){return n===t?o?a(o,e,st.data(o,e)):null:(this.each(function(){st.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){st.removeData(this,e)})}}),st.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=st._data(e,n),r&&(!i||st.isArray(r)?i=st._data(e,n,st.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=st.queue(e,t),r=n.length,i=n.shift(),o=st._queueHooks(e,t),a=function(){st.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return st._data(e,n)||st._data(e,n,{empty:st.Callbacks("once memory").add(function(){st._removeData(e,t+"queue"),st._removeData(e,n)})})}}),st.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?st.queue(this[0],e):n===t?this:this.each(function(){var t=st.queue(this,e,n);st._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&st.dequeue(this,e)})},dequeue:function(e){return this.each(function(){st.dequeue(this,e)})},delay:function(e,t){return e=st.fx?st.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=st.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";s--;)r=st._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var Ct,kt,Et=/[\t\r\n]/g,St=/\r/g,At=/^(?:input|select|textarea|button|object)$/i,jt=/^(?:a|area)$/i,Dt=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,Lt=/^(?:checked|selected)$/i,Ht=st.support.getSetAttribute,Mt=st.support.input;st.fn.extend({attr:function(e,t){return st.access(this,st.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){st.removeAttr(this,e)})},prop:function(e,t){return st.access(this,st.prop,e,t,arguments.length>1)},removeProp:function(e){return e=st.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(st.isFunction(e))return this.each(function(t){st(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(lt)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Et," "):" ")){for(o=0;i=t[o++];)0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=st.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(st.isFunction(e))return this.each(function(t){st(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(lt)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(Et," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");n.className=e?st.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return st.isFunction(e)?this.each(function(n){st(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n)for(var i,o=0,a=st(this),s=t,u=e.match(lt)||[];i=u[o++];)s=r?s:!a.hasClass(i),a[s?"addClass":"removeClass"](i);else("undefined"===n||"boolean"===n)&&(this.className&&st._data(this,"__className__",this.className),this.className=this.className||e===!1?"":st._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(Et," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=st.isFunction(e),this.each(function(r){var o,a=st(this);1===this.nodeType&&(o=i?e.call(this,r,a.val()):e,null==o?o="":"number"==typeof o?o+="":st.isArray(o)&&(o=st.map(o,function(e){return null==e?"":e+""})),n=st.valHooks[this.type]||st.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,o,"value")!==t||(this.value=o))});if(o)return n=st.valHooks[o.type]||st.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(o,"value"))!==t?r:(r=o.value,"string"==typeof r?r.replace(St,""):null==r?"":r)}}}),st.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(st.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&st.nodeName(n.parentNode,"optgroup"))){if(t=st(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=st.makeArray(t);return st(e).find("option").each(function(){this.selected=st.inArray(st(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return e.getAttribute===t?st.prop(e,n,r):(a=1!==s||!st.isXMLDoc(e),a&&(n=n.toLowerCase(),o=st.attrHooks[n]||(Dt.test(n)?kt:Ct)),r===t?o&&a&&"get"in o&&null!==(i=o.get(e,n))?i:(e.getAttribute!==t&&(i=e.getAttribute(n)),null==i?t:i):null!==r?o&&a&&"set"in o&&(i=o.set(e,r,n))!==t?i:(e.setAttribute(n,r+""),r):(st.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(lt);if(o&&1===e.nodeType)for(;n=o[i++];)r=st.propFix[n]||n,Dt.test(n)?!Ht&&Lt.test(n)?e[st.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:st.attr(e,n,""),e.removeAttribute(Ht?n:r)},attrHooks:{type:{set:function(e,t){if(!st.support.radioValue&&"radio"===t&&st.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!st.isXMLDoc(e),a&&(n=st.propFix[n]||n,o=st.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):At.test(e.nodeName)||jt.test(e.nodeName)&&e.href?0:t}}}}),kt={get:function(e,n){var r=st.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?Mt&&Ht?null!=i:Lt.test(n)?e[st.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?st.removeAttr(e,n):Mt&&Ht||!Lt.test(n)?e.setAttribute(!Ht&&st.propFix[n]||n,n):e[st.camelCase("default-"+n)]=e[n]=!0,n}},Mt&&Ht||(st.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return st.nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t
+},set:function(e,n,r){return st.nodeName(e,"input")?(e.defaultValue=n,t):Ct&&Ct.set(e,n,r)}}),Ht||(Ct=st.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},st.attrHooks.contenteditable={get:Ct.get,set:function(e,t,n){Ct.set(e,""===t?!1:t,n)}},st.each(["width","height"],function(e,n){st.attrHooks[n]=st.extend(st.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),st.support.hrefNormalized||(st.each(["href","src","width","height"],function(e,n){st.attrHooks[n]=st.extend(st.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),st.each(["href","src"],function(e,t){st.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),st.support.style||(st.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),st.support.optSelected||(st.propHooks.selected=st.extend(st.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),st.support.enctype||(st.propFix.enctype="encoding"),st.support.checkOn||st.each(["radio","checkbox"],function(){st.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),st.each(["radio","checkbox"],function(){st.valHooks[this]=st.extend(st.valHooks[this],{set:function(e,n){return st.isArray(n)?e.checked=st.inArray(st(e).val(),n)>=0:t}})});var qt=/^(?:input|select|textarea)$/i,_t=/^key/,Ft=/^(?:mouse|contextmenu)|click/,Ot=/^(?:focusinfocus|focusoutblur)$/,Bt=/^([^.]*)(?:\.(.+)|)$/;st.event={global:{},add:function(e,n,r,i,o){var a,s,u,l,c,f,p,d,h,g,m,y=3!==e.nodeType&&8!==e.nodeType&&st._data(e);if(y){for(r.handler&&(a=r,r=a.handler,o=a.selector),r.guid||(r.guid=st.guid++),(l=y.events)||(l=y.events={}),(s=y.handle)||(s=y.handle=function(e){return st===t||e&&st.event.triggered===e.type?t:st.event.dispatch.apply(s.elem,arguments)},s.elem=e),n=(n||"").match(lt)||[""],c=n.length;c--;)u=Bt.exec(n[c])||[],h=m=u[1],g=(u[2]||"").split(".").sort(),p=st.event.special[h]||{},h=(o?p.delegateType:p.bindType)||h,p=st.event.special[h]||{},f=st.extend({type:h,origType:m,data:i,handler:r,guid:r.guid,selector:o,needsContext:o&&st.expr.match.needsContext.test(o),namespace:g.join(".")},a),(d=l[h])||(d=l[h]=[],d.delegateCount=0,p.setup&&p.setup.call(e,i,g,s)!==!1||(e.addEventListener?e.addEventListener(h,s,!1):e.attachEvent&&e.attachEvent("on"+h,s))),p.add&&(p.add.call(e,f),f.handler.guid||(f.handler.guid=r.guid)),o?d.splice(d.delegateCount++,0,f):d.push(f),st.event.global[h]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,m=st.hasData(e)&&st._data(e);if(m&&(u=m.events)){for(t=(t||"").match(lt)||[""],l=t.length;l--;)if(s=Bt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){for(f=st.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=u[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||st.removeEvent(e,d,m.handle),delete u[d])}else for(d in u)st.event.remove(e,d+t[l],n,r,!0);st.isEmptyObject(u)&&(delete m.handle,st._removeData(e,"events"))}},trigger:function(n,r,i,o){var a,s,u,l,c,f,p,d=[i||V],h=n.type||n,g=n.namespace?n.namespace.split("."):[];if(s=u=i=i||V,3!==i.nodeType&&8!==i.nodeType&&!Ot.test(h+st.event.triggered)&&(h.indexOf(".")>=0&&(g=h.split("."),h=g.shift(),g.sort()),c=0>h.indexOf(":")&&"on"+h,n=n[st.expando]?n:new st.Event(h,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=g.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:st.makeArray(r,[n]),p=st.event.special[h]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!st.isWindow(i)){for(l=p.delegateType||h,Ot.test(l+h)||(s=s.parentNode);s;s=s.parentNode)d.push(s),u=s;u===(i.ownerDocument||V)&&d.push(u.defaultView||u.parentWindow||e)}for(a=0;(s=d[a++])&&!n.isPropagationStopped();)n.type=a>1?l:p.bindType||h,f=(st._data(s,"events")||{})[n.type]&&st._data(s,"handle"),f&&f.apply(s,r),f=c&&s[c],f&&st.acceptData(s)&&f.apply&&f.apply(s,r)===!1&&n.preventDefault();if(n.type=h,!(o||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===h&&st.nodeName(i,"a")||!st.acceptData(i)||!c||!i[h]||st.isWindow(i))){u=i[c],u&&(i[c]=null),st.event.triggered=h;try{i[h]()}catch(m){}st.event.triggered=t,u&&(i[c]=u)}return n.result}},dispatch:function(e){e=st.event.fix(e);var n,r,i,o,a,s=[],u=nt.call(arguments),l=(st._data(this,"events")||{})[e.type]||[],c=st.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(s=st.event.handlers.call(this,e,l),n=0;(o=s[n++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,r=0;(a=o.handlers[r++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(a.namespace))&&(e.handleObj=a,e.data=a.data,i=((st.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u),i!==t&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(l.disabled!==!0||"click"!==e.type){for(i=[],r=0;u>r;r++)a=n[r],o=a.selector+" ",i[o]===t&&(i[o]=a.needsContext?st(o,this).index(l)>=0:st.find(o,this,null,[l]).length),i[o]&&i.push(a);i.length&&s.push({elem:l,handlers:i})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[st.expando])return e;var t,n,r=e,i=st.event.fixHooks[e.type]||{},o=i.props?this.props.concat(i.props):this.props;for(e=new st.Event(r),t=o.length;t--;)n=o[t],e[n]=r[n];return e.target||(e.target=r.srcElement||V),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,i.filter?i.filter(e,r):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,a=n.button,s=n.fromElement;return null==e.pageX&&null!=n.clientX&&(r=e.target.ownerDocument||V,i=r.documentElement,o=r.body,e.pageX=n.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?n.toElement:s),e.which||a===t||(e.which=1&a?1:2&a?3:4&a?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return st.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==V.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===V.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=st.extend(new st.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?st.event.trigger(i,null,t):st.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},st.removeEvent=V.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,n,r){var i="on"+n;e.detachEvent&&(e[i]===t&&(e[i]=null),e.detachEvent(i,r))},st.Event=function(e,n){return this instanceof st.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?u:l):this.type=e,n&&st.extend(this,n),this.timeStamp=e&&e.timeStamp||st.now(),this[st.expando]=!0,t):new st.Event(e,n)},st.Event.prototype={isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=u,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=u,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u,this.stopPropagation()}},st.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){st.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!st.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),st.support.submitBubbles||(st.event.special.submit={setup:function(){return st.nodeName(this,"form")?!1:(st.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=st.nodeName(n,"input")||st.nodeName(n,"button")?n.form:t;r&&!st._data(r,"submitBubbles")&&(st.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),st._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&st.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return st.nodeName(this,"form")?!1:(st.event.remove(this,"._submit"),t)}}),st.support.changeBubbles||(st.event.special.change={setup:function(){return qt.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(st.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),st.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),st.event.simulate("change",this,e,!0)})),!1):(st.event.add(this,"beforeactivate._change",function(e){var t=e.target;qt.test(t.nodeName)&&!st._data(t,"changeBubbles")&&(st.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||st.event.simulate("change",this.parentNode,e,!0)}),st._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return st.event.remove(this,"._change"),!qt.test(this.nodeName)}}),st.support.focusinBubbles||st.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){st.event.simulate(t,e.target,st.event.fix(e),!0)};st.event.special[t]={setup:function(){0===n++&&V.addEventListener(e,r,!0)},teardown:function(){0===--n&&V.removeEventListener(e,r,!0)}}}),st.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(s in e)this.on(s,n,r,e[s],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=l;else if(!i)return this;return 1===o&&(a=i,i=function(e){return st().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=st.guid++)),this.each(function(){st.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,st(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=l),this.each(function(){st.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){st.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?st.event.trigger(e,n,r,!0):t},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),st.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){st.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)},_t.test(t)&&(st.event.fixHooks[t]=st.event.keyHooks),Ft.test(t)&&(st.event.fixHooks[t]=st.event.mouseHooks)}),function(e,t){function n(e){return ht.test(e+"")}function r(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>C.cacheLength&&delete e[t.shift()],e[n]=r}}function i(e){return e[P]=!0,e}function o(e){var t=L.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function a(e,t,n,r){var i,o,a,s,u,l,c,d,h,g;if((t?t.ownerDocument||t:R)!==L&&D(t),t=t||L,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!M&&!r){if(i=gt.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&O(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Q.apply(n,K.call(t.getElementsByTagName(e),0)),n;if((a=i[3])&&W.getByClassName&&t.getElementsByClassName)return Q.apply(n,K.call(t.getElementsByClassName(a),0)),n}if(W.qsa&&!q.test(e)){if(c=!0,d=P,h=t,g=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(l=f(e),(c=t.getAttribute("id"))?d=c.replace(vt,"\\$&"):t.setAttribute("id",d),d="[id='"+d+"'] ",u=l.length;u--;)l[u]=d+p(l[u]);h=dt.test(e)&&t.parentNode||t,g=l.join(",")}if(g)try{return Q.apply(n,K.call(h.querySelectorAll(g),0)),n}catch(m){}finally{c||t.removeAttribute("id")}}}return x(e.replace(at,"$1"),t,n,r)}function s(e,t){for(var n=e&&t&&e.nextSibling;n;n=n.nextSibling)if(n===t)return-1;return e?1:-1}function u(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return i(function(t){return t=+t,i(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function f(e,t){var n,r,i,o,s,u,l,c=X[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=C.preFilter;s;){(!n||(r=ut.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(i=[])),n=!1,(r=lt.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(at," ")}),s=s.slice(n.length));for(o in C.filter)!(r=pt[o].exec(s))||l[o]&&!(r=l[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?a.error(e):X(e,u).slice(0)}function p(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function d(e,t,n){var r=t.dir,i=n&&"parentNode"===t.dir,o=I++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,u,l,c=$+" "+o;if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i)if(l=t[P]||(t[P]={}),(u=l[r])&&u[0]===c){if((s=u[1])===!0||s===N)return s===!0}else if(u=l[r]=[c],u[1]=e(t,n,a)||N,u[1]===!0)return!0}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function m(e,t,n,r,o,a){return r&&!r[P]&&(r=m(r)),o&&!o[P]&&(o=m(o,a)),i(function(i,a,s,u){var l,c,f,p=[],d=[],h=a.length,m=i||b(t||"*",s.nodeType?[s]:s,[]),y=!e||!i&&t?m:g(m,p,e,s,u),v=n?o||(i?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r)for(l=g(v,d),r(l,[],s,u),c=l.length;c--;)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f));if(i){if(o||e){if(o){for(l=[],c=v.length;c--;)(f=v[c])&&l.push(y[c]=f);o(null,v=[],l,u)}for(c=v.length;c--;)(f=v[c])&&(l=o?Z.call(i,f):p[c])>-1&&(i[l]=!(a[l]=f))}}else v=g(v===a?v.splice(h,v.length):v),o?o(null,a,v,u):Q.apply(a,v)})}function y(e){for(var t,n,r,i=e.length,o=C.relative[e[0].type],a=o||C.relative[" "],s=o?1:0,u=d(function(e){return e===t},a,!0),l=d(function(e){return Z.call(t,e)>-1},a,!0),c=[function(e,n,r){return!o&&(r||n!==j)||((t=n).nodeType?u(e,n,r):l(e,n,r))}];i>s;s++)if(n=C.relative[e[s].type])c=[d(h(c),n)];else{if(n=C.filter[e[s].type].apply(null,e[s].matches),n[P]){for(r=++s;i>r&&!C.relative[e[r].type];r++);return m(s>1&&h(c),s>1&&p(e.slice(0,s-1)).replace(at,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&p(e))}c.push(n)}return h(c)}function v(e,t){var n=0,r=t.length>0,o=e.length>0,s=function(i,s,u,l,c){var f,p,d,h=[],m=0,y="0",v=i&&[],b=null!=c,x=j,T=i||o&&C.find.TAG("*",c&&s.parentNode||s),w=$+=null==x?1:Math.E;for(b&&(j=s!==L&&s,N=n);null!=(f=T[y]);y++){if(o&&f){for(p=0;d=e[p];p++)if(d(f,s,u)){l.push(f);break}b&&($=w,N=++n)}r&&((f=!d&&f)&&m--,i&&v.push(f))}if(m+=y,r&&y!==m){for(p=0;d=t[p];p++)d(v,h,s,u);if(i){if(m>0)for(;y--;)v[y]||h[y]||(h[y]=G.call(l));h=g(h)}Q.apply(l,h),b&&!i&&h.length>0&&m+t.length>1&&a.uniqueSort(l)}return b&&($=w,j=x),v};return r?i(s):s}function b(e,t,n){for(var r=0,i=t.length;i>r;r++)a(e,t[r],n);return n}function x(e,t,n,r){var i,o,a,s,u,l=f(e);if(!r&&1===l.length){if(o=l[0]=l[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&!M&&C.relative[o[1].type]){if(t=C.find.ID(a.matches[0].replace(xt,Tt),t)[0],!t)return n;e=e.slice(o.shift().value.length)}for(i=pt.needsContext.test(e)?-1:o.length-1;i>=0&&(a=o[i],!C.relative[s=a.type]);i--)if((u=C.find[s])&&(r=u(a.matches[0].replace(xt,Tt),dt.test(o[0].type)&&t.parentNode||t))){if(o.splice(i,1),e=r.length&&p(o),!e)return Q.apply(n,K.call(r,0)),n;break}}return S(e,l)(r,t,M,n,dt.test(e)),n}function T(){}var w,N,C,k,E,S,A,j,D,L,H,M,q,_,F,O,B,P="sizzle"+-new Date,R=e.document,W={},$=0,I=0,z=r(),X=r(),U=r(),V=typeof t,Y=1<<31,J=[],G=J.pop,Q=J.push,K=J.slice,Z=J.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},et="[\\x20\\t\\r\\n\\f]",tt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",nt=tt.replace("w","w#"),rt="([*^$|!~]?=)",it="\\["+et+"*("+tt+")"+et+"*(?:"+rt+et+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+nt+")|)|)"+et+"*\\]",ot=":("+tt+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+it.replace(3,8)+")*)|.*)\\)|)",at=RegExp("^"+et+"+|((?:^|[^\\\\])(?:\\\\.)*)"+et+"+$","g"),ut=RegExp("^"+et+"*,"+et+"*"),lt=RegExp("^"+et+"*([\\x20\\t\\r\\n\\f>+~])"+et+"*"),ct=RegExp(ot),ft=RegExp("^"+nt+"$"),pt={ID:RegExp("^#("+tt+")"),CLASS:RegExp("^\\.("+tt+")"),NAME:RegExp("^\\[name=['\"]?("+tt+")['\"]?\\]"),TAG:RegExp("^("+tt.replace("w","w*")+")"),ATTR:RegExp("^"+it),PSEUDO:RegExp("^"+ot),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+et+"*(even|odd|(([+-]|)(\\d*)n|)"+et+"*(?:([+-]|)"+et+"*(\\d+)|))"+et+"*\\)|)","i"),needsContext:RegExp("^"+et+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+et+"*((?:-\\d)?\\d*)"+et+"*\\)|)(?=[^-]|$)","i")},dt=/[\x20\t\r\n\f]*[+~]/,ht=/\{\s*\[native code\]\s*\}/,gt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,mt=/^(?:input|select|textarea|button)$/i,yt=/^h\d$/i,vt=/'|\\/g,bt=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,xt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,Tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{K.call(H.childNodes,0)[0].nodeType}catch(wt){K=function(e){for(var t,n=[];t=this[e];e++)n.push(t);return n}}E=a.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},D=a.setDocument=function(e){var r=e?e.ownerDocument||e:R;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,H=r.documentElement,M=E(r),W.tagNameNoComments=o(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),W.attributes=o(function(e){e.innerHTML="
";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),W.getByClassName=o(function(e){return e.innerHTML="
",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),W.getByName=o(function(e){e.id=P+0,e.innerHTML="
",H.insertBefore(e,H.firstChild);var t=r.getElementsByName&&r.getElementsByName(P).length===2+r.getElementsByName(P+0).length;return W.getIdNotName=!r.getElementById(P),H.removeChild(e),t}),C.attrHandle=o(function(e){return e.innerHTML="
",e.firstChild&&typeof e.firstChild.getAttribute!==V&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},W.getIdNotName?(C.find.ID=function(e,t){if(typeof t.getElementById!==V&&!M){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},C.filter.ID=function(e){var t=e.replace(xt,Tt);return function(e){return e.getAttribute("id")===t}}):(C.find.ID=function(e,n){if(typeof n.getElementById!==V&&!M){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==V&&r.getAttributeNode("id").value===e?[r]:t:[]}},C.filter.ID=function(e){var t=e.replace(xt,Tt);return function(e){var n=typeof e.getAttributeNode!==V&&e.getAttributeNode("id");return n&&n.value===t}}),C.find.TAG=W.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==V?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i];i++)1===n.nodeType&&r.push(n);return r}return o},C.find.NAME=W.getByName&&function(e,n){return typeof n.getElementsByName!==V?n.getElementsByName(name):t},C.find.CLASS=W.getByClassName&&function(e,n){return typeof n.getElementsByClassName===V||M?t:n.getElementsByClassName(e)},_=[],q=[":focus"],(W.qsa=n(r.querySelectorAll))&&(o(function(e){e.innerHTML="
",e.querySelectorAll("[selected]").length||q.push("\\["+et+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||q.push(":checked")}),o(function(e){e.innerHTML="
",e.querySelectorAll("[i^='']").length&&q.push("[*^$]="+et+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),q.push(",.*:")})),(W.matchesSelector=n(F=H.matchesSelector||H.mozMatchesSelector||H.webkitMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&o(function(e){W.disconnectedMatch=F.call(e,"div"),F.call(e,"[s!='']:x"),_.push("!=",ot)}),q=RegExp(q.join("|")),_=RegExp(_.join("|")),O=n(H.contains)||H.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},B=H.compareDocumentPosition?function(e,t){var n;return e===t?(A=!0,0):(n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&n||e.parentNode&&11===e.parentNode.nodeType?e===r||O(R,e)?-1:t===r||O(R,t)?1:0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,i=0,o=e.parentNode,a=t.parentNode,u=[e],l=[t];if(e===t)return A=!0,0;if(e.sourceIndex&&t.sourceIndex)return(~t.sourceIndex||Y)-(O(R,e)&&~e.sourceIndex||Y);if(!o||!a)return e===r?-1:t===r?1:o?-1:a?1:0;if(o===a)return s(e,t);for(n=e;n=n.parentNode;)u.unshift(n);for(n=t;n=n.parentNode;)l.unshift(n);for(;u[i]===l[i];)i++;return i?s(u[i],l[i]):u[i]===R?-1:l[i]===R?1:0},A=!1,[0,0].sort(B),W.detectDuplicates=A,L):L},a.matches=function(e,t){return a(e,null,null,t)},a.matchesSelector=function(e,t){if((e.ownerDocument||e)!==L&&D(e),t=t.replace(bt,"='$1']"),!(!W.matchesSelector||M||_&&_.test(t)||q.test(t)))try{var n=F.call(e,t);if(n||W.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return a(t,L,null,[e]).length>0},a.contains=function(e,t){return(e.ownerDocument||e)!==L&&D(e),O(e,t)},a.attr=function(e,t){var n;return(e.ownerDocument||e)!==L&&D(e),M||(t=t.toLowerCase()),(n=C.attrHandle[t])?n(e):M||W.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},a.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},a.uniqueSort=function(e){var t,n=[],r=1,i=0;if(A=!W.detectDuplicates,e.sort(B),A){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return e},k=a.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=k(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=k(t);return n},C=a.selectors={cacheLength:50,createPseudo:i,match:pt,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xt,Tt),e[3]=(e[4]||e[5]||"").replace(xt,Tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||a.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&a.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return pt.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&ct.test(n)&&(t=f(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(xt,Tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=z[e+" "];return t||(t=RegExp("(^|"+et+")"+e+"("+et+"|$)"))&&z(e,function(e){return t.test(e.className||typeof e.getAttribute!==V&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=a.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.substr(i.length-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(c=m[P]||(m[P]={}),l=c[e]||[],d=l[0]===$&&l[1],p=l[0]===$&&l[2],f=d&&m.childNodes[d];f=++d&&f&&f[g]||(p=d=0)||h.pop();)if(1===f.nodeType&&++p&&f===t){c[e]=[$,d,p];break}}else if(v&&(l=(t[P]||(t[P]={}))[e])&&l[0]===$)p=l[1];else for(;(f=++d&&f&&f[g]||(p=d=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++p||(v&&((f[P]||(f[P]={}))[e]=[$,p]),f!==t)););return p-=i,p===r||0===p%r&&p/r>=0}}},PSEUDO:function(e,t){var n,r=C.pseudos[e]||C.setFilters[e.toLowerCase()]||a.error("unsupported pseudo: "+e);return r[P]?r(t):r.length>1?(n=[e,e,"",t],C.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,n){for(var i,o=r(e,t),a=o.length;a--;)i=Z.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:i(function(e){var t=[],n=[],r=S(e.replace(at,"$1"));return r[P]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(e){return function(t){return a(e,t).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||k(t)).indexOf(e)>-1}}),lang:i(function(e){return ft.test(e||"")||a.error("unsupported lang: "+e),e=e.replace(xt,Tt).toLowerCase(),function(t){var n;do if(n=M?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===H},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!C.pseudos.empty(e)},header:function(e){return yt.test(e.nodeName)},input:function(e){return mt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;t>++r;)e.push(r);return e})}};for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})C.pseudos[w]=u(w);for(w in{submit:!0,reset:!0})C.pseudos[w]=l(w);S=a.compile=function(e,t){var n,r=[],i=[],o=U[e+" "];if(!o){for(t||(t=f(e)),n=t.length;n--;)o=y(t[n]),o[P]?r.push(o):i.push(o);o=U(e,v(i,r))}return o},C.pseudos.nth=C.pseudos.eq,C.filters=T.prototype=C.pseudos,C.setFilters=new T,D(),a.attr=st.attr,st.find=a,st.expr=a.selectors,st.expr[":"]=st.expr.pseudos,st.unique=a.uniqueSort,st.text=a.getText,st.isXMLDoc=a.isXML,st.contains=a.contains}(e);var Pt=/Until$/,Rt=/^(?:parents|prev(?:Until|All))/,Wt=/^.[^:#\[\.,]*$/,$t=st.expr.match.needsContext,It={children:!0,contents:!0,next:!0,prev:!0};st.fn.extend({find:function(e){var t,n,r;if("string"!=typeof e)return r=this,this.pushStack(st(e).filter(function(){for(t=0;r.length>t;t++)if(st.contains(r[t],this))return!0}));for(n=[],t=0;this.length>t;t++)st.find(e,this[t],n);return n=this.pushStack(st.unique(n)),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=st(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(st.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(f(this,e,!1))},filter:function(e){return this.pushStack(f(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?$t.test(e)?st(e,this.context).index(this[0])>=0:st.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=$t.test(e)||"string"!=typeof e?st(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(a?a.index(n)>-1:st.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}return this.pushStack(o.length>1?st.unique(o):o)},index:function(e){return e?"string"==typeof e?st.inArray(this[0],st(e)):st.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?st(e,t):st.makeArray(e&&e.nodeType?[e]:e),r=st.merge(this.get(),n);return this.pushStack(st.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),st.fn.andSelf=st.fn.addBack,st.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return st.dir(e,"parentNode")},parentsUntil:function(e,t,n){return st.dir(e,"parentNode",n)},next:function(e){return c(e,"nextSibling")},prev:function(e){return c(e,"previousSibling")
+},nextAll:function(e){return st.dir(e,"nextSibling")},prevAll:function(e){return st.dir(e,"previousSibling")},nextUntil:function(e,t,n){return st.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return st.dir(e,"previousSibling",n)},siblings:function(e){return st.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return st.sibling(e.firstChild)},contents:function(e){return st.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:st.merge([],e.childNodes)}},function(e,t){st.fn[e]=function(n,r){var i=st.map(this,t,n);return Pt.test(e)||(r=n),r&&"string"==typeof r&&(i=st.filter(r,i)),i=this.length>1&&!It[e]?st.unique(i):i,this.length>1&&Rt.test(e)&&(i=i.reverse()),this.pushStack(i)}}),st.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?st.find.matchesSelector(t[0],e)?[t[0]]:[]:st.find.matches(e,t)},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!st(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var zt="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Xt=/ jQuery\d+="(?:null|\d+)"/g,Ut=RegExp("<(?:"+zt+")[\\s/>]","i"),Vt=/^\s+/,Yt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Jt=/<([\w:]+)/,Gt=/
\s*$/g,on={option:[1,""],legend:[1,""],area:[1,""],param:[1,""],thead:[1,""],tr:[2,""],col:[2,""],td:[3,""],_default:st.support.htmlSerialize?[0,"",""]:[1,"X","
"]},an=p(V),sn=an.appendChild(V.createElement("div"));on.optgroup=on.option,on.tbody=on.tfoot=on.colgroup=on.caption=on.thead,on.th=on.td,st.fn.extend({text:function(e){return st.access(this,function(e){return e===t?st.text(this):this.empty().append((this[0]&&this[0].ownerDocument||V).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(st.isFunction(e))return this.each(function(t){st(this).wrapAll(e.call(this,t))});if(this[0]){var t=st(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return st.isFunction(e)?this.each(function(t){st(this).wrapInner(e.call(this,t))}):this.each(function(){var t=st(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=st.isFunction(e);return this.each(function(n){st(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){st.nodeName(this,"body")||st(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=0;null!=(n=this[r]);r++)(!e||st.filter(e,[n]).length>0)&&(t||1!==n.nodeType||st.cleanData(b(n)),n.parentNode&&(t&&st.contains(n.ownerDocument,n)&&m(b(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&st.cleanData(b(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&st.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return st.clone(this,e,t)})},html:function(e){return st.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Xt,""):t;if(!("string"!=typeof e||Kt.test(e)||!st.support.htmlSerialize&&Ut.test(e)||!st.support.leadingWhitespace&&Vt.test(e)||on[(Jt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Yt,"<$1>$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(st.cleanData(b(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){var t=st.isFunction(e);return t||"string"==typeof e||(e=st(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;(n&&1===this.nodeType||11===this.nodeType)&&(st(this).remove(),t?t.parentNode.insertBefore(e,t):n.appendChild(e))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=et.apply([],e);var i,o,a,s,u,l,c=0,f=this.length,p=this,m=f-1,y=e[0],v=st.isFunction(y);if(v||!(1>=f||"string"!=typeof y||st.support.checkClone)&&en.test(y))return this.each(function(i){var o=p.eq(i);v&&(e[0]=y.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(f&&(i=st.buildFragment(e,this[0].ownerDocument,!1,this),o=i.firstChild,1===i.childNodes.length&&(i=o),o)){for(n=n&&st.nodeName(o,"tr"),a=st.map(b(i,"script"),h),s=a.length;f>c;c++)u=i,c!==m&&(u=st.clone(u,!0,!0),s&&st.merge(a,b(u,"script"))),r.call(n&&st.nodeName(this[c],"table")?d(this[c],"tbody"):this[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,st.map(a,g),c=0;s>c;c++)u=a[c],tn.test(u.type||"")&&!st._data(u,"globalEval")&&st.contains(l,u)&&(u.src?st.ajax({url:u.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):st.globalEval((u.text||u.textContent||u.innerHTML||"").replace(rn,"")));i=o=null}return this}}),st.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){st.fn[e]=function(e){for(var n,r=0,i=[],o=st(e),a=o.length-1;a>=r;r++)n=r===a?this:this.clone(!0),st(o[r])[t](n),tt.apply(i,n.get());return this.pushStack(i)}}),st.extend({clone:function(e,t,n){var r,i,o,a,s,u=st.contains(e.ownerDocument,e);if(st.support.html5Clone||st.isXMLDoc(e)||!Ut.test("<"+e.nodeName+">")?s=e.cloneNode(!0):(sn.innerHTML=e.outerHTML,sn.removeChild(s=sn.firstChild)),!(st.support.noCloneEvent&&st.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||st.isXMLDoc(e)))for(r=b(s),i=b(e),a=0;null!=(o=i[a]);++a)r[a]&&v(o,r[a]);if(t)if(n)for(i=i||b(e),r=r||b(s),a=0;null!=(o=i[a]);a++)y(o,r[a]);else y(e,s);return r=b(s,"script"),r.length>0&&m(r,!u&&b(e,"script")),r=i=o=null,s},buildFragment:function(e,t,n,r){for(var i,o,a,s,u,l,c,f=e.length,d=p(t),h=[],g=0;f>g;g++)if(o=e[g],o||0===o)if("object"===st.type(o))st.merge(h,o.nodeType?[o]:o);else if(Qt.test(o)){for(s=s||d.appendChild(t.createElement("div")),a=(Jt.exec(o)||["",""])[1].toLowerCase(),u=on[a]||on._default,s.innerHTML=u[1]+o.replace(Yt,"<$1>$2>")+u[2],c=u[0];c--;)s=s.lastChild;if(!st.support.leadingWhitespace&&Vt.test(o)&&h.push(t.createTextNode(Vt.exec(o)[0])),!st.support.tbody)for(o="table"!==a||Gt.test(o)?""!==u[1]||Gt.test(o)?0:s:s.firstChild,c=o&&o.childNodes.length;c--;)st.nodeName(l=o.childNodes[c],"tbody")&&!l.childNodes.length&&o.removeChild(l);for(st.merge(h,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=d.lastChild}else h.push(t.createTextNode(o));for(s&&d.removeChild(s),st.support.appendChecked||st.grep(b(h,"input"),x),g=0;o=h[g++];)if((!r||-1===st.inArray(o,r))&&(i=st.contains(o.ownerDocument,o),s=b(d.appendChild(o),"script"),i&&m(s),n))for(c=0;o=s[c++];)tn.test(o.type||"")&&n.push(o);return s=null,d},cleanData:function(e,n){for(var r,i,o,a,s=0,u=st.expando,l=st.cache,c=st.support.deleteExpando,f=st.event.special;null!=(o=e[s]);s++)if((n||st.acceptData(o))&&(i=o[u],r=i&&l[i])){if(r.events)for(a in r.events)f[a]?st.event.remove(o,a):st.removeEvent(o,a,r.handle);l[i]&&(delete l[i],c?delete o[u]:o.removeAttribute!==t?o.removeAttribute(u):o[u]=null,K.push(i))}}});var un,ln,cn,fn=/alpha\([^)]*\)/i,pn=/opacity\s*=\s*([^)]*)/,dn=/^(top|right|bottom|left)$/,hn=/^(none|table(?!-c[ea]).+)/,gn=/^margin/,mn=RegExp("^("+ut+")(.*)$","i"),yn=RegExp("^("+ut+")(?!px)[a-z%]+$","i"),vn=RegExp("^([+-])=("+ut+")","i"),bn={BODY:"block"},xn={position:"absolute",visibility:"hidden",display:"block"},Tn={letterSpacing:0,fontWeight:400},wn=["Top","Right","Bottom","Left"],Nn=["Webkit","O","Moz","ms"];st.fn.extend({css:function(e,n){return st.access(this,function(e,n,r){var i,o,a={},s=0;if(st.isArray(n)){for(i=ln(e),o=n.length;o>s;s++)a[n[s]]=st.css(e,n[s],!1,i);return a}return r!==t?st.style(e,n,r):st.css(e,n)},e,n,arguments.length>1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:w(this))?st(this).show():st(this).hide()})}}),st.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=un(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":st.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=st.camelCase(n),l=e.style;if(n=st.cssProps[u]||(st.cssProps[u]=T(l,u)),s=st.cssHooks[n]||st.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=vn.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(st.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||st.cssNumber[u]||(r+="px"),st.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=st.camelCase(n);return n=st.cssProps[u]||(st.cssProps[u]=T(e.style,u)),s=st.cssHooks[n]||st.cssHooks[u],s&&"get"in s&&(o=s.get(e,!0,r)),o===t&&(o=un(e,n,i)),"normal"===o&&n in Tn&&(o=Tn[n]),r?(a=parseFloat(o),r===!0||st.isNumeric(a)?a||0:o):o},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(ln=function(t){return e.getComputedStyle(t,null)},un=function(e,n,r){var i,o,a,s=r||ln(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||st.contains(e.ownerDocument,e)||(u=st.style(e,n)),yn.test(u)&&gn.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):V.documentElement.currentStyle&&(ln=function(e){return e.currentStyle},un=function(e,n,r){var i,o,a,s=r||ln(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),yn.test(u)&&!dn.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u}),st.each(["height","width"],function(e,n){st.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&hn.test(st.css(e,"display"))?st.swap(e,xn,function(){return E(e,n,i)}):E(e,n,i):t},set:function(e,t,r){var i=r&&ln(e);return C(e,t,r?k(e,n,r,st.support.boxSizing&&"border-box"===st.css(e,"boxSizing",!1,i),i):0)}}}),st.support.opacity||(st.cssHooks.opacity={get:function(e,t){return pn.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=st.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===st.trim(o.replace(fn,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=fn.test(o)?o.replace(fn,i):o+" "+i)}}),st(function(){st.support.reliableMarginRight||(st.cssHooks.marginRight={get:function(e,n){return n?st.swap(e,{display:"inline-block"},un,[e,"marginRight"]):t}}),!st.support.pixelPosition&&st.fn.position&&st.each(["top","left"],function(e,n){st.cssHooks[n]={get:function(e,r){return r?(r=un(e,n),yn.test(r)?st(e).position()[n]+"px":r):t}}})}),st.expr&&st.expr.filters&&(st.expr.filters.hidden=function(e){return 0===e.offsetWidth&&0===e.offsetHeight||!st.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||st.css(e,"display"))},st.expr.filters.visible=function(e){return!st.expr.filters.hidden(e)}),st.each({margin:"",padding:"",border:"Width"},function(e,t){st.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+wn[r]+t]=o[r]||o[r-2]||o[0];return i}},gn.test(e)||(st.cssHooks[e+t].set=C)});var Cn=/%20/g,kn=/\[\]$/,En=/\r?\n/g,Sn=/^(?:submit|button|image|reset)$/i,An=/^(?:input|select|textarea|keygen)/i;st.fn.extend({serialize:function(){return st.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=st.prop(this,"elements");return e?st.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!st(this).is(":disabled")&&An.test(this.nodeName)&&!Sn.test(e)&&(this.checked||!Zt.test(e))}).map(function(e,t){var n=st(this).val();return null==n?null:st.isArray(n)?st.map(n,function(e){return{name:t.name,value:e.replace(En,"\r\n")}}):{name:t.name,value:n.replace(En,"\r\n")}}).get()}}),st.param=function(e,n){var r,i=[],o=function(e,t){t=st.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=st.ajaxSettings&&st.ajaxSettings.traditional),st.isArray(e)||e.jquery&&!st.isPlainObject(e))st.each(e,function(){o(this.name,this.value)});else for(r in e)j(r,e[r],n,o);return i.join("&").replace(Cn,"+")};var jn,Dn,Ln=st.now(),Hn=/\?/,Mn=/#.*$/,qn=/([?&])_=[^&]*/,_n=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Fn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,On=/^(?:GET|HEAD)$/,Bn=/^\/\//,Pn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Rn=st.fn.load,Wn={},$n={},In="*/".concat("*");try{Dn=Y.href}catch(zn){Dn=V.createElement("a"),Dn.href="",Dn=Dn.href}jn=Pn.exec(Dn.toLowerCase())||[],st.fn.load=function(e,n,r){if("string"!=typeof e&&Rn)return Rn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),st.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(o="POST"),s.length>0&&st.ajax({url:e,type:o,dataType:"html",data:n}).done(function(e){a=arguments,s.html(i?st("").append(st.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,a||[e.responseText,t,e])}),this},st.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){st.fn[t]=function(e){return this.on(t,e)}}),st.each(["get","post"],function(e,n){st[n]=function(e,r,i,o){return st.isFunction(r)&&(o=o||i,i=r,r=t),st.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),st.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Dn,type:"GET",isLocal:Fn.test(jn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":In,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":st.parseJSON,"text xml":st.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?H(H(e,st.ajaxSettings),t):H(st.ajaxSettings,e)},ajaxPrefilter:D(Wn),ajaxTransport:D($n),ajax:function(e,n){function r(e,n,r,s){var l,f,v,b,T,N=n;2!==x&&(x=2,u&&clearTimeout(u),i=t,a=s||"",w.readyState=e>0?4:0,r&&(b=M(p,w,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=w.getResponseHeader("Last-Modified"),T&&(st.lastModified[o]=T),T=w.getResponseHeader("etag"),T&&(st.etag[o]=T)),304===e?(l=!0,N="notmodified"):(l=q(p,b),N=l.state,f=l.data,v=l.error,l=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),w.status=e,w.statusText=(n||N)+"",l?g.resolveWith(d,[f,N,w]):g.rejectWith(d,[w,N,v]),w.statusCode(y),y=t,c&&h.trigger(l?"ajaxSuccess":"ajaxError",[w,p,l?f:v]),m.fireWith(d,[w,N]),c&&(h.trigger("ajaxComplete",[w,p]),--st.active||st.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var i,o,a,s,u,l,c,f,p=st.ajaxSetup({},n),d=p.context||p,h=p.context&&(d.nodeType||d.jquery)?st(d):st.event,g=st.Deferred(),m=st.Callbacks("once memory"),y=p.statusCode||{},v={},b={},x=0,T="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!s)for(s={};t=_n.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)y[t]=[y[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||T;return i&&i.abort(t),r(0,t),this}};if(g.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,p.url=((e||p.url||Dn)+"").replace(Mn,"").replace(Bn,jn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=st.trim(p.dataType||"*").toLowerCase().match(lt)||[""],null==p.crossDomain&&(l=Pn.exec(p.url.toLowerCase()),p.crossDomain=!(!l||l[1]===jn[1]&&l[2]===jn[2]&&(l[3]||("http:"===l[1]?80:443))==(jn[3]||("http:"===jn[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=st.param(p.data,p.traditional)),L(Wn,p,n,w),2===x)return w;c=p.global,c&&0===st.active++&&st.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!On.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(Hn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=qn.test(o)?o.replace(qn,"$1_="+Ln++):o+(Hn.test(o)?"&":"?")+"_="+Ln++)),p.ifModified&&(st.lastModified[o]&&w.setRequestHeader("If-Modified-Since",st.lastModified[o]),st.etag[o]&&w.setRequestHeader("If-None-Match",st.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&w.setRequestHeader("Content-Type",p.contentType),w.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+In+"; q=0.01":""):p.accepts["*"]);for(f in p.headers)w.setRequestHeader(f,p.headers[f]);if(p.beforeSend&&(p.beforeSend.call(d,w,p)===!1||2===x))return w.abort();T="abort";for(f in{success:1,error:1,complete:1})w[f](p[f]);if(i=L($n,p,n,w)){w.readyState=1,c&&h.trigger("ajaxSend",[w,p]),p.async&&p.timeout>0&&(u=setTimeout(function(){w.abort("timeout")},p.timeout));try{x=1,i.send(v,r)}catch(N){if(!(2>x))throw N;r(-1,N)}}else r(-1,"No Transport");return w},getScript:function(e,n){return st.get(e,t,n,"script")},getJSON:function(e,t,n){return st.get(e,t,n,"json")}}),st.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return st.globalEval(e),e}}}),st.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),st.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=V.head||st("head")[0]||V.documentElement;return{send:function(t,i){n=V.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Xn=[],Un=/(=)\?(?=&|$)|\?\?/;st.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xn.pop()||st.expando+"_"+Ln++;return this[e]=!0,e}}),st.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Un.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Un.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=st.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Un,"$1"+o):n.jsonp!==!1&&(n.url+=(Hn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||st.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Xn.push(o)),s&&st.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Vn,Yn,Jn=0,Gn=e.ActiveXObject&&function(){var e;for(e in Vn)Vn[e](t,!0)};st.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&_()||F()}:_,Yn=st.ajaxSettings.xhr(),st.support.cors=!!Yn&&"withCredentials"in Yn,Yn=st.support.ajax=!!Yn,Yn&&st.ajaxTransport(function(n){if(!n.crossDomain||st.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,f,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=st.noop,Gn&&delete Vn[a]),i)4!==u.readyState&&u.abort();else{f={},s=u.status,p=u.responseXML,c=u.getAllResponseHeaders(),p&&p.documentElement&&(f.xml=p),"string"==typeof u.responseText&&(f.text=u.responseText);try{l=u.statusText}catch(d){l=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=f.text?200:404}}catch(h){i||o(-1,h)}f&&o(s,l,f,c)},n.async?4===u.readyState?setTimeout(r):(a=++Jn,Gn&&(Vn||(Vn={},st(e).unload(Gn)),Vn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Qn,Kn,Zn=/^(?:toggle|show|hide)$/,er=RegExp("^(?:([+-])=|)("+ut+")([a-z%]*)$","i"),tr=/queueHooks$/,nr=[W],rr={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=er.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(st.cssNumber[e]?"":"px"),"px"!==r&&s){s=st.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,st.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};st.Animation=st.extend(P,{tweener:function(e,t){st.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],rr[n]=rr[n]||[],rr[n].unshift(t)},prefilter:function(e,t){t?nr.unshift(e):nr.push(e)}}),st.Tween=$,$.prototype={constructor:$,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(st.cssNumber[n]?"":"px")},cur:function(){var e=$.propHooks[this.prop];return e&&e.get?e.get(this):$.propHooks._default.get(this)},run:function(e){var t,n=$.propHooks[this.prop];return this.pos=t=this.options.duration?st.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):$.propHooks._default.set(this),this}},$.prototype.init.prototype=$.prototype,$.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=st.css(e.elem,e.prop,"auto"),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){st.fx.step[e.prop]?st.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[st.cssProps[e.prop]]||st.cssHooks[e.prop])?st.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},$.propHooks.scrollTop=$.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},st.each(["toggle","show","hide"],function(e,t){var n=st.fn[t];st.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(I(t,!0),e,r,i)}}),st.fn.extend({fadeTo:function(e,t,n,r){return this.filter(w).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=st.isEmptyObject(e),o=st.speed(t,n,r),a=function(){var t=P(this,st.extend({},e),o);a.finish=function(){t.stop(!0)},(i||st._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=st.timers,a=st._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&tr.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&st.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=st._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=st.timers,a=r?r.length:0;for(n.finish=!0,st.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),st.each({slideDown:I("show"),slideUp:I("hide"),slideToggle:I("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){st.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),st.speed=function(e,t,n){var r=e&&"object"==typeof e?st.extend({},e):{complete:n||!n&&t||st.isFunction(e)&&e,duration:e,easing:n&&t||t&&!st.isFunction(t)&&t};return r.duration=st.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in st.fx.speeds?st.fx.speeds[r.duration]:st.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){st.isFunction(r.old)&&r.old.call(this),r.queue&&st.dequeue(this,r.queue)},r},st.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},st.timers=[],st.fx=$.prototype.init,st.fx.tick=function(){var e,n=st.timers,r=0;for(Qn=st.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||st.fx.stop(),Qn=t},st.fx.timer=function(e){e()&&st.timers.push(e)&&st.fx.start()},st.fx.interval=13,st.fx.start=function(){Kn||(Kn=setInterval(st.fx.tick,st.fx.interval))},st.fx.stop=function(){clearInterval(Kn),Kn=null},st.fx.speeds={slow:600,fast:200,_default:400},st.fx.step={},st.expr&&st.expr.filters&&(st.expr.filters.animated=function(e){return st.grep(st.timers,function(t){return e===t.elem}).length}),st.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){st.offset.setOffset(this,e,t)});var n,r,i={top:0,left:0},o=this[0],a=o&&o.ownerDocument;if(a)return n=a.documentElement,st.contains(n,o)?(o.getBoundingClientRect!==t&&(i=o.getBoundingClientRect()),r=z(a),{top:i.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:i.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):i},st.offset={setOffset:function(e,t,n){var r=st.css(e,"position");"static"===r&&(e.style.position="relative");var i,o,a=st(e),s=a.offset(),u=st.css(e,"top"),l=st.css(e,"left"),c=("absolute"===r||"fixed"===r)&&st.inArray("auto",[u,l])>-1,f={},p={};c?(p=a.position(),i=p.top,o=p.left):(i=parseFloat(u)||0,o=parseFloat(l)||0),st.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+i),null!=t.left&&(f.left=t.left-s.left+o),"using"in t?t.using.call(e,f):a.css(f)}},st.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===st.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),st.nodeName(e[0],"html")||(n=e.offset()),n.top+=st.css(e[0],"borderTopWidth",!0),n.left+=st.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-st.css(r,"marginTop",!0),left:t.left-n.left-st.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||V.documentElement;e&&!st.nodeName(e,"html")&&"static"===st.css(e,"position");)e=e.offsetParent;return e||V.documentElement})}}),st.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);st.fn[e]=function(i){return st.access(this,function(e,i,o){var a=z(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?st(a).scrollLeft():o,r?o:st(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}}),st.each({Height:"height",Width:"width"},function(e,n){st.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){st.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return st.access(this,function(n,r,i){var o;return st.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?st.css(n,r,s):st.style(n,r,i,s)},n,a?i:t,a,null)}})}),e.jQuery=e.$=st,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return st})})(window);
+//@ sourceMappingURL=jquery.min.map
\ No newline at end of file
diff --git a/assets/js/redactor.min.js b/assets/js/redactor.min.js
new file mode 100644
index 00000000..9ef3bb79
--- /dev/null
+++ b/assets/js/redactor.min.js
@@ -0,0 +1,12 @@
+/*
+ Redactor v8.2.2
+ Updated: January 17, 2013
+
+ http://redactorjs.com/
+
+ Copyright (c) 2009-2013, Imperavi Inc.
+ License: http://redactorjs.com/license/
+
+ Usage: $('#content').redactor();
+*/
+eval(function(p,a,c,k,e,d){e=function(c){return(c
35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('H 5t,4W;F(Z 5x==="1h"){H 5x={}}H N={11:"bC",22:"3p aa",3k:"3p a2",1m:"5Q",2p:"am",93:"3p 2p",4O:"bF",37:"bG",8A:"bA",8E:"bz",5a:"a4",8G:"5m 1",8P:"5m 2",8Q:"5m 3",91:"5m 4",2K:"bt",2z:"bJ",3j:"bY ae",2M:"c0 ae",3E:"bL aG",3C:"c2 aG",3t:"b6",3y:"bg",3Q:"bf",4v:"3p",5R:"b8",9E:"4r",6b:"3p 5Q",67:"4p 5U bb",62:"4p 5U be",63:"4p 5W aQ",65:"4p 5W 9M",5O:"4r 5W",5N:"4r 5U",5J:"4r 5Q",8J:"df",8L:"dk",5G:"4p 9Q",5E:"4r 9Q",U:"d5",9B:"dm",21:"dI",1x:"aQ",32:"9M",9r:"a2 dq am",18:"b0",4u:"5Z",do:"5T",8M:"aa du a4",2d:"3p dy",3S:"7M",cm:"ck",5S:"cq",82:"ch 5S",8y:"c7 2d c4",5D:"9T 18 9U ao 1x",5H:"c5 18",5L:"9T 18 9U ao 32",5K:"cd 18",5i:"3p cK cQ",3c:"cD",5P:"cC",9u:"cZ 2p cE 2r cF",3U:"cB",56:"cA"};(G(b){3G.fn.1Y=G(c){K E.1q(G(){H e=b(E);H d=e.1v("1Y");F(!d){e.1v("1Y",(d=2r a(E,c)))}})};H a=G(d,c){E.$el=b(d);F(Z c!=="1h"&&Z c.4y!=="1h"&&c.4y!=="en"&&Z 5x[c.4y]!=="1h"){N=5x[c.4y]}E.J=b.3q({1y:I,12:I,4y:"en",6H:"cx",2f:I,6Q:I,6S:I,6l:I,61:I,8U:X,1k:I,4I:I,4A:X,4f:I,2H:I,9C:0,9y:I,5v:X,1I:X,96:X,1J:I,8B:I,8j:X,6g:X,7o:"7v://",5h:I,6z:I,8p:60,4n:I,49:I,42:I,5Y:I,5b:I,47:I,7x:I,7q:I,2i:I,2E:X,4a:X,9j:["1i","1f","3A","2Z","2v","cy","cz","2B","6C","6A","cG","cH","cP","cR","cS","cO","cN","cJ","7Z","cI","cM","5a","1U","M","1e","a","br","p","b","i","8q","8f","u","2y","22","5v","cu","2X","1y","1T","2k","41","2e","ct","cc","cb","2U","3b","1t","9b","dl","dt","dd","ce","cf","ca","1u","5a","6D","c9","8h","em","1m","1S","1j","4t","3d","23","9m","4D","4C","4x","4w","6s","6B"],4o:I,8T:{},8S:[],3a:["11","|","37","|","2K","2z","3c","|","3E","3C","3t","3y","|","3k","22","2d","1m","2p","|","3j","2M","|","56","|","5i"],8Z:["37","|","2K","2z","3c","|","3E","3C","3t","3y","|","3j","2M"],8R:["p","2e","1u","4D","4C","4x","4w"],5g:["3c","2z","2K","3U","3E","3C"],9w:{b:"2K",8h:"2K",i:"2z",em:"2z",8q:"3c",8f:"3c",2U:"3E",3b:"3C",u:"3U"},6w:["#c6","#c8","#cg","#cp","#cr","#cs","#co","#cn","#cj","#ci","#cl","#cT","#9i","#cU","#dw","#dx","#dz","#dv","#dp","#dr","#ds","#dA","#dB","#dJ","#dK","#dL","#dM","#dH","#dD","#dC","#7Y","#dE","#dF","#dG","#dn","#d3","#d2","#d4","#d6","#d1","#d0","#7Y","#cW","#cV","#cX","#cY","#c3","#dh","#di","#dj","#dg","#da","#d9","#db","#dN","#9i","#bT","#bd","#bc","#b9","#ba","#bm","#bn","#b7","#bl","#bk"],5q:"
",3z:I,3N:X,a6:2C()+\'<1i R="bh" 4d="5r" 3n="" 5A="5C/1i-1v"><1e>bi (bj)1e><1f 1r="18" R="7w" Y="2G" /><1f 1r="2d" R="3x" 1E="2d" />1i>
\',9Y:2C()+\'<1e>\'+N.U+\'1e><1f R="6a" Y="2G" /><1e>\'+N.2p+\'1e><1f R="39" Y="2G" /><1e>\'+N.9B+\'1e><2Z R="69"><2v 28="21">\'+N.21+\'2v><2v 28="1x">\'+N.1x+\'2v><2v 28="32">\'+N.32+\'2v>2Z>\'+N.9E+\'&1Q;&1Q;&1Q;\'+N.3Q+\'<1f 1r="3A" 1E="5R" Y="2q" R="9R" 28="\'+N.5R+\'" />\',aC:2C()+\'\'+N.3S+\'\'+N.5S+\'\'+N.2p+\'<1i R="bR" 4d="5r" 3n="" 5A="5C/1i-1v"><1f 1r="2d" R="3x" 1E="2d" />1i><1e>\'+N.9r+\'1e><1f 1r="18" 1E="39" R="39" Y="2G" />\'+N.3Q+\'<1f 1r="3A" 1E="3S" Y="2q" R="9p" 28="\'+N.4v+\'" />\',aM:2C()+\'<1i R="bS" 4d="5r" 3n="">5T5Z\'+N.5P+\'<1f 1r="7t" R="4b" 28="1" /><1e>5T1e><1f 1r="18" R="54" Y="2G" /><1e>\'+N.18+\'1e><1f 1r="18" Y="2G 4P" R="9N" /><1e><1f 1r="bP" R="7l"> \'+N.9u+\'1e><1e>5Z1e><1f 1r="18" R="7C" Y="2G" /><1e>\'+N.18+\'1e><1f 1r="18" Y="2G 4P" R="a8" /><1e>\'+N.5P+\'1e><1f 1r="18" Y="2G" R="7k" /><1e>\'+N.18+\'1e><1f 1r="18" Y="2G 4P" R="aR" />1i>\'+N.3Q+\'<1f 1r="3A" Y="2q" R="aO" 28="\'+N.4v+\'" />\',aK:2C()+\'<1e>\'+N.8J+\'1e><1f 1r="18" 2m="5" 28="2" R="5I" /><1e>\'+N.8L+\'1e><1f 1r="18" 2m="5" 28="3" R="aL" />\'+N.3Q+\'<1f 1r="3A" 1E="3S" Y="2q" R="b1" 28="\'+N.4v+\'" />\',al:2C()+\'<1i R="bp"><1e>\'+N.8M+\'1e><2B R="68" 1G="25: 99%; 1B: bU;">2B>1i>\'+N.3Q+\'<1f 1r="3A" Y="2q" R="af" 28="\'+N.4v+\'" />\',1a:{11:{U:N.11,1l:"86"},37:{U:N.37,1l:"1p",2g:{p:{U:N.8A,1c:"2n"},2e:{U:N.8E,1c:"2n",2w:"bV"},1u:{U:N.5a,1c:"2n",2w:"bW"},4D:{U:N.8G,1c:"2n",2w:"bX"},4C:{U:N.8P,1c:"2n",2w:"bK"},4x:{U:N.8Q,1c:"2n",2w:"bw"},4w:{U:N.91,1c:"2n",2w:"bx"}}},2K:{U:N.2K,1c:"2K"},2z:{U:N.2z,1c:"2z"},3c:{U:N.3c,1c:"by"},3U:{U:N.3U,1c:"3U"},3E:{U:"&bv; "+N.3E,1c:"95"},3C:{U:"1. "+N.3C,1c:"94"},3t:{U:"< "+N.3t,1c:"3t"},3y:{U:"> "+N.3y,1c:"3y"},3k:{U:N.3k,1l:"aw"},22:{U:N.22,1l:"ad"},2d:{U:N.2d,1l:"aH"},1m:{U:N.1m,1l:"1p",2g:{6b:{U:N.6b,1l:"ax"},bu:{1E:"5n"},67:{U:N.67,1l:"9X"},62:{U:N.62,1l:"9I"},63:{U:N.63,1l:"aj"},65:{U:N.65,1l:"ab"},bq:{1E:"5n"},5G:{U:N.5G,1l:"9Z"},5E:{U:N.5E,1l:"5F"},bs:{1E:"5n"},5O:{U:N.5O,1l:"at"},5N:{U:N.5N,1l:"aX"},5J:{U:N.5J,1l:"a0"}}},2p:{U:N.2p,1l:"1p",2g:{2p:{U:N.93,1l:"ar"},4O:{U:N.4O,1c:"4O"}}},3j:{U:N.3j,1l:"1p"},2M:{U:N.2M,1l:"1p"},56:{U:N.56,1l:"1p",2g:{71:{U:N.5D,1c:"6Z"},7a:{U:N.5H,1c:"4V"},78:{U:N.5L,1c:"4T"},4F:{U:N.5K,1c:"4R"}}},71:{1c:"6Z",U:N.5D},7a:{1c:"4V",U:N.5H},78:{1c:"4T",U:N.5L},4F:{1c:"4R",U:N.5K},5i:{1c:"6o",U:N.5i}}},c,E.$el.1v());E.4G=[];E.45()};a.81={45:G(){E.1B=E.$el.12("1B");E.25=E.$el.12("25");4W=E.V=V;5t=E.1V=1V;F(E.J.96===I&&E.2R()){E.6I(X);K I}F(E.J.1y){E.J.4A=I}F(E.J.1J){E.J.3a=E.J.8Z}L{F(E.J.1a!==I){F(E.J.5v===I){H d=E.J.3a.3e("11");H e=E.J.3a[d+1];E.J.3a.8Y(d,1);F(Z e!=="1h"&&e==="|"){E.J.3a.8Y(d,1)}}b.3q(E.J.1a,E.J.8T);b.1q(E.J.8S,b.Q(G(f,g){E.J.3a.6v(g)},E))}}F(E.J.1a!==I){b.1q(E.J.1a.37.2g,b.Q(G(f,g){F(b.5j(f,E.J.8R)=="-1"){98 E.J.1a.37.2g[f]}},E))}G c(){E.8I();E.8n();F(Z E.J.61==="1T"){b.1q(E.J.61,b.Q(G(j,k){F(Z 6P[k]!=="1h"){b.3q(E,6P[k]);F(Z 6P[k].45!=="1h"){E.45()}}},E))}F(E.J.5g!==I&&E.J.1a!==I){H g=b.Q(G(){E.9v()},E);E.$T.1d(g).2O(g)}H i=I;F(E.1n("3F")&&48.3Z.3e("92")===-1){H f=E.1n("5l").7G(".");F(f[0]\');F(E.J.1J){E.1J=b(\'\')}E.$1M=17;G h(){E.$T=E.$1M.8F().1w("1X").16("6L",X).16("8D",E.J.6H);4W=E.V=E.$T[0].gn;5t=E.1V=E.V.gj||1V;F(E.J.12!==I){E.$1M.8F().1w("ge").19(\'<2p 4m="gf" 1b="\'+E.J.12+\'" />\')}E.$T.11(f);F(i){i.4S(E);i=17}}E.4J=X;F(E.$el.1g(0).1z==="8H"){F(E.J.1y){H g=E;E.$1M=b(\'<1y 1G="25: 4B%;" gp="0">1y>\').aJ(G(){h.4S(g)})}L{E.$1M=E.$T=b("")}H d=E.$el.1g(0).2w.7G(/\\s+/);b.1q(d,b.Q(G(j,k){E.$1M.2a("gw"+k)},E))}L{E.4J=I;E.$1M=E.$T=E.$el;E.$el=b(\'<2B 1E="\'+E.$T.16("R")+\'">2B>\').12("1B",E.1B)}F(E.$T){E.$T.2a("4c").16("6L",X).16("8D",E.J.6H)}F(E.J.4I!==I){E.$1M.16("4I",E.J.4I)}F(E.J.4f!==I){E.$1M.12("gs-1B",E.J.4f+"1Z")}F(E.J.8B===X){E.$1M.2a("8K")}F(E.J.4A===I){E.$1M.12("1B",E.1B)}E.$el.1P();H f="";F(E.4J){f=E.$el.15();f=E.6f(f);E.$24.8C(E.$el).19(E.$1M).19(E.$el)}L{f=E.$T.11();f=E.6f(f);E.$24.8C(E.$1M).19(E.$el).19(E.$T)}f=E.9o(f);F(E.$T){E.$T.11(f)}F(E.4J===I){E.1s()}}L{F(E.$el.1g(0).1z!=="8H"){H f=E.$el.15();H c=b(\'<2B 1E="\'+E.$T.16("R")+\'">2B>\').12("1B",E.1B).15(f);E.$el.1P();E.$el.2h(c)}}F(i&&E.$T){i.4S(E)}},8I:G(){F(E.J.1J===I){K I}E.1J.1P();E.$T.44("8O",b.Q(G(c){E.8N(c)},E));E.$T.44("97",b.Q(G(){E.1J.1P()},E))},8N:G(g){b(".6T").1P();H c=E.1J.9D();H f=g.gd;F(b(E.V).25()<(f+c)){f=f-c}H d=g.g0+b(V).3O()+14;F(E.J.1y===X){d=d+E.$24.2J().1A;f=f+E.$24.2J().1x}E.1J.12({1x:f+"1Z",1A:d+"1Z"}).1p()},1s:G(){E.$el.15(E.$T.11())},5d:G(c){c=E.4l(c);E.$T.11(c).1k();E.1s()},4H:G(){H c="";F(E.J.3N){c=E.$T.11()}L{c=E.$el.15()}K E.4l(c)},7f:G(c){E.$T.1k();E.6V(c);E.2E();E.1s()},6V:G(d){H h,c;F(E.V.1o){h=E.1V.1o();F(h.4h&&h.4k){c=h.4h(0);c.fZ();H e=E.V.3v("M");e.3L=d;H i=E.V.aY(),g,f;3B(g=e.aW){f=i.4Y(g)}c.a9(i);F(f){c=c.b3();c.fY(f);c.3s(X);h.7c();h.6d(c)}}}L{F(E.V.1R&&E.V.1R.1r!="fV"){E.V.1R.2Y().6U(d)}}},8o:G(){H d=E.4H();F(E.4J){E.$24.2h(E.$el);E.$24.1C();E.$el.1B(E.1B).15(d).1p()}L{E.$24.2h(E.$T);E.$24.1C();E.$T.26("4c").26("8K").16("6L",I).11(d).1p()}F(E.J.4o){b(E.J.4o).7u()}b(".6T").1C();3f(H c=0;cf){H d="4B%";F(E.J.9y){e=E.$24.2l().1x;d=E.$24.9D()}E.2H=X;E.$1a.12({2J:"2H",25:d,9z:gv,1A:E.J.9C+"1Z",1x:e})}L{E.2H=I;E.$1a.12({2J:"go",25:"3u",9z:1,1A:0,1x:e})}},9A:G(){E.2I();E.J.3z=E.$T.11()},9q:G(){F(E.J.3z===I){K I}E.$T.11(E.J.3z);F(!E.1n("2b")){E.2S()}E.J.3z=I},1O:G(d,c){F(E.J.3N==I){E.$el.1k();K I}7e{H k;F(d==="3r"){F(E.1n("2b")){E.$T.1k();E.V.1R.2Y().6U(c)}L{E.6V(c)}E.2E()}L{F(d==="4O"){k=E.2L();F(b(k).1g(0).1z==="A"){b(k).2F(b(k).18())}L{E.3h(d,c)}}L{F(d==="6Z"||d==="4V"||d==="4T"||d==="4R"){k=E.3o();H l=b(k).1g(0).1z;F(E.J.1y===I&&b(k).gl(".4c").2m()==0){K I}H g=["P","6k","ft","fg","eh","ei","ej","eg","6m","ef"];F(b.5j(l,g)!=-1){H i=I;F(d==="4V"){i="9f"}L{F(d==="4T"){i="32"}L{F(d==="4R"){i="4F"}}}F(i===I){b(k).12("18-6F","")}L{b(k).12("18-6F",i)}}L{E.3h(d,c)}}L{F(d==="2n"&&c==="2e"){k=E.3o();F(b(k).1g(0).1z==="6m"){F(E.1n("2b")){H f=b(""+b(k).11()+"
");b(k).2F(f)}L{E.3h(d,"p")}}L{F(b(k).1g(0).1z==="P"){H j=b(k).1W();F(b(j).1g(0).1z==="6m"){H f=b(""+b(k).11()+"
");b(j).2F(f);E.4g(f[0],0,f[0],0)}L{F(E.1n("2b")){H f=b("<2e>"+b(k).11()+"2e>");b(k).2F(f)}L{E.3h(d,c)}}}L{E.3h(d,c)}}}L{F(d==="2n"&&(c==="1u"||c==="p")){k=E.2L();F(b(k).1g(0).1z==="5f"){b(k).2F(""+E.6e(b(k).18())+"
")}L{E.3h(d,c)}}L{F(d==="6o"&&E.1n("2b")){E.$T.1k()}F(d==="2n"&&E.1n("33")){E.$T.1k()}E.3h(d,c)}}}}}F(d==="6o"){E.$T.1w("9b").az("R")}E.1s();F(E.2P()){E.$T.1k()}F(Z E.J.6l==="G"){E.J.6l(E,d)}F(E.J.1J){E.1J.1P()}}6n(h){}},3h:G(c,d){F(c==="2n"&&E.1n("2b")){d="<"+d+">"}E.V.1O(c,I,d)},9h:G(f){H d=E.2L();F(d.au==="6k"&&d.2w==="4c"){H c=b(E.3o());F(c.1g(0).1z==="6k"&&(c.11()===""||c.11()==="
")){H g=b("").19(c.3M().1g(0).7A);c.2F(g);g.11("
");E.4g(g[0],0,g[0],0)}}},8z:G(d,c){F(d.4z&&c===13){d.31();E.3W(b("<1U>
1U>").1g(0));E.1s();K I}L{K X}},9n:G(g){H c=b.4N(E.$T.11());F(E.1n("33")){c=c.O(/
/i,"")}H f=c.O(/<(?:.|\\n)*?>/gm,"");F(c===""||f===""){g.31();H d=b(E.J.5q).1g(0);E.$T.11(d);E.4g(d,0,d,0);E.1s();K I}L{E.1s()}},9o:G(e){e=b.4N(e);F(e===""||e==="
"){K E.J.5q}F(E.J.6g){e=e.O(/([\\w\\W]*?)<\\/M>/gi,"$2
")}H f=G(h,i,g){K h.O(2r 3D(i,"g"),g)};H c=G(h,g){K f(e,h,g)};H d="(1m|23|9m|6r|ew|3d|1S|1j|4t|M|dl|dd|dt|2U|3b|1t|1u|2Z|1i|2e|9l|ex|1G|eu|1T|1f|41|p|h[1-6])";e+="\\n";c("
\\\\s*
","\\n\\n");c("(<"+d+"[^>]*>)","\\n$1");c("("+d+">)","$1\\n\\n");c("\\r\\n|\\r","\\n");c("\\n\\n+","\\n\\n");c("\\n?((.|\\n)+?)$","$1
\\n");c("\\\\s*?
","");c("(]*>\\\\s*)","$1");c("
([^<]+)\\\\s*?((M|9l|1i)[^>]*>)","
$1
$2");c("\\\\s*(?"+d+"[^>]*>)\\\\s*
","$1");c("(<1t.+?)
","$1");c("\\\\s*(?"+d+"[^>]*>)","$1");c("(?"+d+"[^>]*>)\\\\s*
","$1");c("(?"+d+"[^>]*>)\\\\s*
","$1");c("
(\\\\s*?(p|1t|M|dl|dd|dt|4t|1u|1j|2U|3b)[^>]*>)","$1");F(e.3e("<1u")!=-1){c("(<1u(.|\\n)*?>)((.|\\n)*?)1u>",G(j,i,h,g){K f(i,"\\\\\\\\([\'\\"\\\\\\\\])","$1")+f(f(f(g,"","\\n"),"
|
",""),"\\\\\\\\([\'\\"\\\\\\\\])","$1")+"1u>"})}K c("\\n
$","")},4l:G(d){H e=E.J.9j;H c=/<\\/?([a-z][a-et-9]*)\\b[^>]*>/gi;K d.O(c,G(g,f){K b.5j(f.7T(),e)>"-1"?g:""})},6f:G(c){H d=c.5c(/<1u(.*?)>([\\w\\W]*?)<\\/1u>/gi);F(d!==17){b.1q(d,b.Q(G(f,g){H e=g.5c(/<1u(.*?)>([\\w\\W]*?)<\\/1u>/i);e[2]=E.6e(e[2]);c=c.O(g,"<1u"+e[1]+">"+e[2]+"1u>")},E))}K c},6e:G(c){c=2C(c).O(/&7z;/g,"&").O(/&4M;/g,"<").O(/>/g,">").O(/&9F;/g,\'"\');K 2C(c).O(/&/g,"&7z;").O(//g,">").O(/"/g,"&9F;")},7R:G(d){d=d.O(/
/gi,"\\n");d=d.O(/<\\/p>/gi,"\\n");d=d.O(/<\\/M>/gi,"\\n");H c=E.V.3v("M");c.3L=d;K c.er||c.es},8m:G(c){H d=E.2L();F(b(d).1g(0).1z==="5f"){c=E.7R(c);E.6i(c);K X}c=c.O(/|<\\?(?:ea)?[\\s\\S]*?\\?>/gi,"");c=c.O(/(&1Q;){2,}/gi,"&1Q;");c=c.O(/([\\w\\W]*?)<\\/b>/gi,"$2");c=E.4l(c);c=c.O(/<1j><\\/1j>/gi,"[1j]");c=c.O(/<1j>&1Q;<\\/1j>/gi,"[1j]");c=c.O(/<1j>
<\\/1j>/gi,"[1j]");c=c.O(/([\\w\\W]*?)<\\/a>/gi,\'[a 1b="$2"]$4[/a]\');c=c.O(/<1y(.*?)>([\\w\\W]*?)<\\/1y>/gi,"[1y$1]$2[/1y]");c=c.O(/<22(.*?)>([\\w\\W]*?)<\\/22>/gi,"[22$1]$2[/22]");c=c.O(/<2X(.*?)>([\\w\\W]*?)<\\/2X>/gi,"[2X$1]$2[/2X]");c=c.O(/<2k(.*?)>([\\w\\W]*?)<\\/2k>/gi,"[2k$1]$2[/2k]");c=c.O(/<1T(.*?)>([\\w\\W]*?)<\\/1T>/gi,"[1T$1]$2[/1T]");c=c.O(/<41(.*?)>/gi,"[41$1]");c=c.O(/<2y(.*?)1G="(.*?)"(.*?)>/gi,"[2y$1$3]");c=c.O(/<(\\w+)([\\w\\W]*?)>/gi,"<$1>");c=c.O(/<[^\\/>][^>]*>(\\s*|\\t*|\\n*|&1Q;|
)<\\/[^>]+>/gi,"");c=c.O(/<[^\\/>][^>]*>(\\s*|\\t*|\\n*|&1Q;|
)<\\/[^>]+>/gi,"");c=c.O(/\\[1j\\]/gi,"<1j>&1Q;1j>");c=c.O(/\\[a 1b="(.*?)"\\]([\\w\\W]*?)\\[\\/a\\]/gi,\'$2\');c=c.O(/\\[1y(.*?)\\]([\\w\\W]*?)\\[\\/1y\\]/gi,"<1y$1>$21y>");c=c.O(/\\[22(.*?)\\]([\\w\\W]*?)\\[\\/22\\]/gi,"<22$1>$222>");c=c.O(/\\[2X(.*?)\\]([\\w\\W]*?)\\[\\/2X\\]/gi,"<2X$1>$22X>");c=c.O(/\\[2k(.*?)\\]([\\w\\W]*?)\\[\\/2k\\]/gi,"<2k$1>$22k>");c=c.O(/\\[1T(.*?)\\]([\\w\\W]*?)\\[\\/1T\\]/gi,"<1T$1>$21T>");c=c.O(/\\[41(.*?)\\]/gi,"<41$1>");c=c.O(/\\[2y(.*?)\\]/gi,"<2y$1>");F(E.J.6g){c=c.O(/([\\w\\W]*?)<\\/M>/gi,"$2
")}c=c.O(/<1U>([\\w\\W]*?)<\\/1U>/gi,"$1");c=c.O(/\\n{3,}/gi,"\\n");c=c.O(//gi,"
");c=c.O(/<\\/p><\\/p>/gi,"
");F(E.1n("33")){c=c.O(/
$/gi,"")}E.6i(c)},6i:G(c){E.1O("3r",c);F(E.J.4A===X){b(E.V.1X).3O(E.5u)}L{E.$T.3O(E.5u)}},85:G(d){H c=[];H e=d.5c(/<1u(.*?)>([\\w\\W]*?)<\\/1u>/gi);F(e!==17){b.1q(e,G(f,g){d=d.O(g,"80"+f);c.6v(g)})}d=d.O(/\\s{2,}/g," ");d=d.O(/\\n/g," ");d=d.O(/[\\t]*/g,"");d=d.O(/\\n\\s*\\n/g,"\\n");d=d.O(/^[\\s\\n]*/g,"");d=d.O(/[\\s\\n]*$/g,"");d=d.O(/>\\s+<");F(c){b.1q(c,G(f,g){d=d.O("80"+f,g)});c=[]}K d},7N:G(c){c=c.O(/<1t/g,"\\t<1t");c=c.O(/<1S/g,"\\t<1S");c=c.O(/<1j/g,"\\t\\t<1j");c=c.O(/<\\/1S>/g,"\\t1S>");K c},83:G(f){H e=["<1u>1u>","<2e>\\\\s*2e>","\\\\s*","<2U>2U>","<3b>3b>","<1t>1t>","<1m>1m>","<1S>1S>","<1U>\\\\s*<1U>","<1U>&1Q;<1U>","\\\\s*","&1Q;","\\\\s*
","&1Q;
","\\\\s*
\\\\s*
","\\\\s*","\\\\s*
\\\\s*"];3f(H d=0;d","3b>","<6C","<6A","<1T","<2k","<2Z","<2v","<1f","<2B","<1u","<2e","<2U","<3b","<1t","","<4t","<1S","<1j","<6D"];3f(H d=0;d","
","4D>","4C>","4x>","4w>","6s>","6B>","
","
","","","","1i>","2e>","1u>","6A>","6C>","1T>","2k>","2B>","2Z>","2v>","1m>","23>","3d>","1S>","1j>","4t>","6D>"];3f(H d=0;d").2a("f6");F(E.J.1J){b(E.1J).19(E.$1a);b("1X").19(E.1J)}L{F(E.J.4o===I){E.$24.5B(E.$1a)}L{b(E.J.4o).11(E.$1a)}}b.1q(E.J.3a,b.Q(G(d,c){F(c!=="|"&&Z E.J.1a[c]!=="1h"){H e=E.J.1a[c];F(E.J.5b===I&&c==="2d"){K X}E.$1a.19(b("<1t>").19(E.3V(c,e)))}F(c==="|"){E.$1a.19(b(\'<1t Y="5z">1t>\'))}},E))},3V:G(d,e){H c=b(\'\');F(Z e.1l==="1h"){c.1d(b.Q(G(){F(b.5j(d,E.J.5g)!=-1){E.6u();E.2T(d)}F(E.1n("33")){E.$T.1k()}E.1O(e.1c,d)},E))}L{F(e.1l!=="1p"){c.1d(b.Q(G(g){E[e.1l](g)},E))}}F(Z e.2f!=="1h"&&e.2f!==I){c.1d(b.Q(G(g){e.2f(E,g,d)},E))}F(d==="2M"||d==="3j"||Z(e.2g)!=="1h"){H f=b(\'\');F(d==="2M"||d==="3j"){f=E.89(f,d)}L{f=E.8l(f,e.2g)}E.4G.6v(f.5w(b(V.1X)));E.8u=b.Q(G(g){E.8v(g,f,d)},E);c.1d(E.8u)}K c},8l:G(d,c){b.1q(c,b.Q(G(e,g){F(Z(g.2w)==="1h"){g.2w=""}H f;F(Z g.1E!=="1h"&&g.1E==="5n"){f=b(\'\')}L{f=b(\'\'+g.U+"");F(Z(g.2f)==="G"){b(f).1d(b.Q(G(h){g.2f(E,h,e)},E))}L{F(Z(g.1l)==="1h"){b(f).1d(b.Q(G(){E.1O(g.1c,e)},E))}L{b(f).1d(b.Q(G(h){E[g.1l](h)},E))}}}b(d).19(f)},E));K d},89:G(l,k){H f;F(k==="2M"){F(E.1n("2b")){f="8i"}L{f="f8"}}L{f="9G"}b(l).25(f9);H g=E.J.6w.3g;3f(H e=0;e\').12({eU:c});b(l).19(j);H h=E;b(j).1d(G(){h.1O(f,b(E).16("4m"));F(f==="9G"){h.$T.1w("8g").2F(G(){K b(\'<1U 1G="4L: \'+b(E).16("4L")+\';">\'+b(E).11()+"1U>")})}F(h.1n("2b")&&f==="8i"){h.$T.1w("8g").2F(G(){K b(\'<1U 1G="\'+b(E).16("1G")+\'">\'+b(E).11()+"1U>")})}})}H d=b(\'
\').11(N.21);F(k==="2M"){d.1d(b.Q(E.8k,E))}L{d.1d(b.Q(E.8a,E))}b(l).19(d);K l},8k:G(){b(E.2L()).12("eE-4L","eA");E.1s()},8a:G(){b(E.2L()).16("4L","").12("4L","");E.1s()},8v:G(i,j,d){F(E.1F(d).7S("3K")){E.5o()}L{E.5o();E.2T(d);E.1F(d).2a("3K");H h=E.1F(d).2l().1x;F(E.J.1J){H f=E.1J.2l().1A;b(j).12({2J:"7L",1x:h+"1Z",1A:f+30+"1Z"}).1p()}L{F(E.J.2H&&E.2H){b(j).12({2J:"2H",1x:h+"1Z",1A:"eC"}).1p()}L{H g=E.$1a.2l().1A+30;b(j).12({2J:"7L",1x:h+"1Z",1A:g+"1Z"}).1p()}}}H c=b.Q(G(k){E.8s(k,j,d)},E);b(V).6x("1d",c);E.$T.6x("1d",c);E.$1M.6x("1d",c);i.eK()},5o:G(){E.$1a.1w("a.3K").26("6t").26("3K");b(".8t").1P()},8s:G(d,f,c){F(!b(d.1H).7S("3K")){b(f).26("3K");E.eR=I;E.5o()}},1F:G(c){F(E.J.1a===I){K I}K b(E.$1a.1w("a.5y"+c))},2T:G(c){E.1F(c).2a("6t")},6E:G(c){E.1F(c).26("6t")},6u:G(){b.1q(E.J.5g,b.Q(G(c,d){E.6E(d)},E))},eP:G(c,d){E.1F(c).2a("5y"+d)},eL:G(c,d){E.1F(c).26("5y"+d)},eM:G(){E.$1a.19(b(\'<1t Y="5z">1t>\'))},eN:G(c){H d=E.1F(c);d.1W().2h(b(\'<1t Y="5z">1t>\'))},eO:G(c){H d=E.1F(c);d.1W().2A(b(\'<1t Y="5z">1t>\'))},ff:G(c){H d=E.1F(c);d.1W().aB().1C()},eD:G(c){H d=E.1F(c);d.1W().eF().1C()},e3:G(c){F(E.J.1a===I){K I}E.1F(c).1W().2a("6j")},e2:G(c){F(E.J.1a===I){K I}E.1F(c).1W().26("6j")},e1:G(d,e,g,f){F(E.J.1a===I){K I}H c=E.3V(d,{U:e,2f:g,2g:f});E.$1a.19(b("<1t>").19(c))},e7:G(d,e,g,f){F(E.J.1a===I){K I}H c=E.3V(d,{U:e,2f:g,2g:f});E.$1a.5B(b("<1t>").19(c))},dZ:G(i,d,f,h,g){F(E.J.1a===I){K I}H c=E.3V(d,{U:f,2f:h,2g:g});H e=E.1F(i);e.1W().2h(b("<1t>").19(c))},dY:G(g,d,f,i,h){F(E.J.1a===I){K I}H c=E.3V(d,{U:f,2f:i,2g:h});H e=E.1F(g);e.1W().2A(b("<1t>").19(c))},eo:G(c,e){H d=E.1F(c);F(e===X){d.1W().aB().1C()}d.1W().26("6j");d.1C()},aq:G(d){H c=d.gh(X);H e=E.V.3v("M");e.4Y(c);K e.3L},6h:G(){H c=E.$T.1g(0);H e=E.V.aY(),d;3B((d=c.aW)){e.4Y(d)}K e},2I:G(){E.$T.1k();E.3l=E.b2();E.4X=E.aU()},2S:G(){F(Z E.3l!=="1h"&&E.3l!==17&&E.4X!==17&&E.3l[0].1z!=="fW"){F(E.J.1y===I&&b(E.3l[0]).3I(".4c").2m()==0){E.$T.1k()}L{F(E.1n("8x")){E.$T.1k()}E.4g(E.3l[0],E.3l[1],E.4X[0],E.4X[1]);F(E.1n("33")){E.$T.1k()}}}L{E.$T.1k()}},1o:G(){H c=E.V;F(E.1V.1o){K E.1V.1o()}L{F(c.1o){K c.1o()}L{K c.1R.2Y()}}K I},6p:G(){F(!E.2P()){H e;K(e=E.1o())&&(e.6q!=17)&&(e.2N!=17)}L{H d=E.$T.1g(0);H c;d.1k();F(!d.V.1R){K I}c=d.V.1R.2Y();K c&&c.4Z().V===d.V}},b2:G(){F(!E.2P()){H e;F(!((e=E.1o())&&(e.2N!=17))){K 17}K[e.2N,e.g6]}L{H d=E.$T.1g(0);H c;d.1k();F(!E.6p()){K 17}c=d.V.1R.2Y();K E.6G(d.V,c,X)}},aU:G(){F(!E.2P()){H e;F(!((e=E.1o())&&(e.6q!=17))){K 17}K[e.6q,e.g9]}L{H d=E.$T.1g(0);H c;d.1k();F(!E.6p()){K 17}c=d.V.1R.2Y();K E.6G(d.V,c,I)}},4g:G(k,j,i,g){F(i==17){i=k}F(g==17){g=j}F(!E.2P()){H f=E.1o();F(!f){K}F(f.3s&&f.3q){f.3s(k,j);f.3q(i,g)}L{r=E.V.2Y();r.g4(k,j);r.g3(i,g);7e{f.7c()}6n(h){}f.6d(r)}}L{H d=E.$T.1g(0);H c=d.V.1X.ah();E.6Y(d.V,c,I,i,g);E.6Y(d.V,c,X,k,j);K c.2Z()}},3o:G(){F(Z E.1V.1o!=="1h"){K E.9W().2o}L{F(Z E.V.1R!=="1h"){K E.1o().4Z()}}},2L:G(){K b(E.3o()).1W()[0]},9W:G(){F(E.2P()){K E.1o().4Z()}L{F(Z E.1V.1o!=="1h"){H c=E.1V.1o();F(c.4k>0){K E.1o().4h(0).g1}L{K I}}L{F(Z E.V.1R!=="1h"){K E.1o()}}}},6G:G(h,f,g){H j,c,e,i,d;c=h.3v("a");j=f.gr();j.3s(g);d=j.4Z();3B(X){d.9P(c,c.6W);j.6K(c);F(!(j.9K((g?"6X":"9J"),f)>0&&(c.6W!=17))){4e}}F(j.9K((g?"6X":"9J"),f)===-1&&c.9L){j.ag((g?"gq":"ai"),f);e=c.9L;i=j.18.3g}L{e=c.2o;i=E.a3(c)}c.2o.6J(c);K[e,i]},6Y:G(h,l,k,e,f){H i,g,j,c,d;d=0;i=E.53(e)?e:e.7A[f];g=E.53(e)?e.2o:e;F(E.53(e)){d=f}c=h.3v("a");g.9P(c,i||17);j=h.1X.ah();j.6K(c);c.2o.6J(c);l.ag((k?"6X":"ai"),j);K l[k?"gx":"gg"]("g2",d)},53:G(c){K(c!=17?c.57==3:I)},a3:G(d){H c=0;3B(d=d.6W){c++}K c},fU:G(c){E.2I();E.3W(c);E.2S()},3W:G(g){F(E.1V.1o){H h=E.1o();F(h.4k){H d=h.4h(0);d.3s(I);d.a9(g);d=d.b3();d.fs(g);d.3s(I);h.7c();h.6d(d)}}L{F(E.V.1R){H e=(g.57===1)?g.5k:g.1v;H i="fw"+(""+2j.7I()).fz(2);e+=\'<1U R="\'+i+\'">1U>\';H f=E.1o();f.3s(I);f.6U(e);H c=E.V.fr(i);f.6K(c);f.2Z();c.2o.6J(c)}}},8w:G(){H f="";F(E.1V.1o){H g=E.1V.1o();F(g.4k){H d=E.V.3v("M");3f(H e=0,c=g.4k;e
e){b(g).25(m)}F(p>j){b(g).1B(p)}f=2j.3H(o.6N-b(E).eq(0).2l().1x);c=2j.3H(o.7d-b(E).eq(0).2l().1A)}})},ax:G(){E.2I();E.3w(N.1m,E.J.aK,fB,b.Q(G(){b("#b1").1d(b.Q(E.aV,E));3i(G(){b("#5I").1k()},52)},E))},aV:G(){H m=b("#5I").15();H f=b("#aL").15();H c=b("");H d=2j.aP(2j.7I()*b4);H k=b(\'<1m R="1m\'+d+\'"><3d>3d>1m>\');3f(H g=0;g1S>");3f(H j=0;j
1j>");b(l).19(e)}b(k).19(l)}b(c).19(k);H h=b(c).11()+"";E.2S();E.1O("3r",h);E.1D();E.5e()},a5:G(c){E.$1m=b(c.1H).3I("1m");E.$a7=E.$1m.1w("1S");E.$fN=E.$1m.1w("1j");E.$3d=b(c.1H).3I("3d");E.$23=b(E.$1m).1w("23");E.$64=b(c.1H);E.$3P=b(c.1H).3I("1S")},a0:G(){b(E.$1m).1C();E.$1m=I;E.1s()},aX:G(){b(E.$3P).1C();E.1s()},at:G(){H c=b(E.$64).1g(0).fM;b(E.$1m).1w("1S").1q(G(){b(E).1w("1j").eq(c).1C()});E.1s()},9Z:G(){F(b(E.$1m).1w("23").2m()!==0){E.5F()}L{H c=b(E.$1m).1w("1S").fP().3M();c.1w("1j").11("&1Q;");E.$23=b("<23>23>");E.$23.19(c);b(E.$1m).5B(E.$23);E.1s()}},5F:G(){b(E.$23).1C();E.$23=I;E.1s()},9X:G(){E.5M("2A")},9I:G(){E.5M("2h")},aj:G(){E.6c("2A")},ab:G(){E.6c("2h")},5M:G(c){H d=b(E.$3P).3M();d.1w("1j").11("&1Q;");F(c==="2h"){b(E.$3P).2h(d)}L{b(E.$3P).2A(d)}E.1s()},6c:G(d){H c=0;E.$3P.1w("1j").1q(b.Q(G(e,f){F(b(f)[0]===E.$64[0]){c=e}},E));E.$a7.1q(G(e,f){H g=b(f).1w("1j").eq(c);H h=g.3M();h.11("&1Q;");F(d==="2h"){b(g).2h(h)}L{b(g).2A(h)}});E.1s()},ad:G(){E.2I();E.3w(N.22,E.J.al,fQ,b.Q(G(){b("#af").1d(b.Q(E.a1,E));3i(G(){b("#68").1k()},52)},E))},a1:G(){H c=b("#68").15();c=E.4l(c);E.2S();E.1O("3r",c);E.1D()},9O:G(f){H c=b(f.1H);H d=c.1W();H g=b.Q(G(){b("#6a").15(c.16("7F"));b("#fS").16("1b",c.16("4j"));b("#69").15(c.12("58"));F(b(d).1g(0).1z==="A"){b("#39").15(b(d).16("1b"))}b("#9H").1d(b.Q(G(){E.9V(c)},E));b("#9R").1d(b.Q(G(){E.an(c)},E))},E);E.3w(N.3k,E.J.9Y,fR,g)},9V:G(c){b(c).1C();E.1D();E.1s()},an:G(d){H c=b(d).1W();b(d).16("7F",b("#6a").15());H f=b("#69").15();F(f==="1x"){b(d).12({"58":"1x",43:"0 59 59 0"})}L{F(f==="32"){b(d).12({"58":"32",43:"0 0 59 59"})}L{b(d).12({"58":"21",43:"0"})}}H e=b.4N(b("#39").15());F(e!==""){F(b(c).1g(0).1z!=="A"){b(d).2F(\'\'+E.5k(d)+"")}L{b(c).16("1b",e)}}L{F(b(c).1g(0).1z==="A"){b(c).2F(E.5k(d))}}E.1D();E.2E();E.1s()},aw:G(){E.2I();H c=b.Q(G(){F(E.J.4n!==I){b.fG(E.J.4n,b.Q(G(h){H f={};H j=0;b.1q(h,b.Q(G(k,l){F(Z l.55!=="1h"){j++;f[l.55]=j}},E));H g=I;b.1q(h,b.Q(G(n,o){H m="";F(Z o.U!=="1h"){m=o.U}H k=0;F(!b.ap(f)&&Z o.55!=="1h"){k=f[o.55];F(g===I){g=".3R"+k}}H l=b(\'<2y 4j="\'+o.fJ+\'" Y="3R 3R\'+k+\'" 4m="\'+o.3k+\'" U="\'+m+\'" />\');b("#5V").19(l);b(l).1d(b.Q(E.aF,E))},E));F(!b.ap(f)){b(".3R").1P();b(g).1p();H i=G(k){b(".3R").1P();b(".3R"+b(k.1H).15()).1p()};H e=b(\'<2Z R="fI">\');b.1q(f,G(m,l){e.19(b(\'<2v 28="\'+l+\'">\'+m+"2v>"))});b("#5V").2A(e);e.9S(i)}},E))}L{b("#2V a").eq(1).1C()}F(E.J.49!==I){F(E.J.7q===I&&E.2R()===I){F(b("#3x").2m()!==0){b("#3x").7h({2s:E.J.49,2i:E.J.2i,2c:b.Q(E.42,E),2D:b.Q(E.J.5Y,E)})}}E.7m("3x",{3u:X,2s:E.J.49,2c:b.Q(E.42,E),2D:b.Q(E.J.5Y,E)})}L{b(".2t").1P();F(E.J.4n===I){b("#2V").1C();b("#5X").1p()}L{H d=b("#2V a");d.eq(0).1C();d.eq(1).2a("3m");b("#6y").1p()}}b("#9p").1d(b.Q(E.as,E));F(E.J.49===I&&E.J.4n===I){3i(G(){b("#39").1k()},52)}},E);E.3w(N.3k,E.J.aC,fH,c)},aF:G(c){E.5s(\'<2y 4j="\'+b(c.1H).16("4m")+\'" 7F="\'+b(c.1H).16("U")+\'" />\',X)},as:G(){F(b("#39").15()!==""){H c=\'<2y 4j="\'+b("#39").15()+\'" />\';E.5s(c,X)}L{E.1D()}},42:G(c){E.5s(c)},5s:G(d,e){E.2S();F(d!==I){H c="";F(e!==X){c=\'<2y 4j="\'+d.ay+\'" />
\'}L{c=d}E.1O("3r",c);F(e!==X&&Z E.J.42==="G"){E.J.42(E,d)}}E.1D();E.2E()},ar:G(){E.2I();H c=b.Q(G(){E.2u=I;H h=E.1o();H d="",j="",i="";F(E.1n("2b")){H f=E.2L();F(f.au==="A"){E.2u=b(f);j=E.2u.18();d=E.2u.16("1b");i=E.2u.16("1H")}L{F(E.2P()){j=h.18}L{j=h.38()}}}L{F(h&&h.2N&&h.2N.2o.1z==="A"){d=h.2N.2o.1b;j=h.2N.2o.18;i=h.2N.2o.1H;F(h.38()===""){E.2u=h.2N.2o}}L{j=h.38()}}b(".4P").15(j);H e=fD.fK.1b.O(/\\/$/i,"");H g=d.O(e,"");F(d.3Y("4u:")===0){E.7n(2);b("#4b").15(2);b("#7C").15(d.O("4u:",""))}L{F(g.3Y(/^#/gi)===0){E.7n(3);b("#4b").15(3);b("#7k").15(g.O(/^#/gi,""))}L{b("#54").15(g)}}F(i==="ac"){b("#7l").16("ak",X)}b("#aO").1d(b.Q(E.aS,E));3i(G(){b("#54").1k()},52)},E);E.3w(N.2p,E.J.aM,fL,c)},aS:G(){H g=b("#4b").15();H e="",i="",h="";F(g==="1"){e=b("#54").15();i=b("#9N").15();F(b("#7l").16("ak")){h=\' 1H="ac"\'}H f="/(w+:{0,1}w*@)?(S+)(:[0-9]+)?(/|/([w#!:.?+=&%@!-/]))?/";H d=2r 3D("^(7v|9g|9e)://"+f,"i");H c=2r 3D("^"+f,"i");F(e.3Y(d)==-1&&e.3Y(c)==0&&E.J.7o!==I){e=E.J.7o+e}}L{F(g==="2"){e="4u:"+b("#7C").15();i=b("#a8").15()}L{F(g==="3"){e="#"+b("#7k").15();i=b("#aR").15()}}}E.aZ(\'"+i+"",b.4N(i),e,h)},aZ:G(c,f,d,e){E.$T.1k();E.2S();F(f!==""){F(E.2u){b(E.2u).18(f);b(E.2u).16("1b",d);F(e!==""){b(E.2u).16("1H",e)}L{b(E.2u).az("1H")}E.1s()}L{E.1O("3r",c)}}E.1D()},aH:G(){E.2I();H c=b.Q(G(){H d=E.1o();H e="";F(E.2P()){e=d.18}L{e=d.38()}b("#7w").15(e);F(E.J.7q===I&&E.2R()===I){b("#3x").7h({2s:E.J.5b,2i:E.J.2i,2c:b.Q(E.47,E),2D:b.Q(E.J.7x,E)})}E.7m("3x",{3u:X,2s:E.J.5b,2c:b.Q(E.47,E),2D:b.Q(E.J.7x,E)})},E);E.3w(N.2d,E.J.a6,fO,c)},47:G(c){E.2S();F(c!==I){H e=b("#7w").15();F(e===""){e=c.fA}H d=\'\'+e+"";F(E.1n("3F")&&!!E.1V.7K){d=d+"&1Q;"}E.1O("3r",d);F(Z E.J.47==="G"){E.J.47(E,c)}}E.1D()},3w:G(f,e,c,g){F(b("#3J").2m()===0){E.4a=b(\'\');b("1X").5B(E.4a)}F(E.J.4a){b("#3J").1p();b("#3J").1d(b.Q(E.1D,E))}F(b("#2x").2m()===0){E.aI=b(\'&fm;\');b("1X").19(E.aI)}b("#7p").1d(b.Q(E.1D,E));E.4i=b.Q(G(h){F(h.5p===27){E.1D();K I}},E);b(V).2O(E.4i);E.$T.2O(E.4i);F(e.3e("#")==0){b("#4U").7u().19(b(e).11())}L{b("#4U").7u().19(e)}b("#4Q").11(f);F(Z b.fn.aN!=="1h"){b("#2x").aN({9x:"#4Q"});b("#4Q").12("51","fj")}F(b("#2V").2m()!==0){H d=E;b("#2V a").1q(G(h,j){h++;b(j).1d(G(){b("#2V a").26("3m");b(E).2a("3m");b(".2t").1P();b("#2t"+h).1p();b("#4b").15(h);F(d.2R()===I){H i=b("#2x").b5();b("#2x").12("43-1A","-"+(i+10)/2+"1Z")}})})}b("#2x .3T").1d(b.Q(E.1D,E));F(E.2R()===I){b("#2x").12({2J:"2H",1A:"-7E",1x:"50%",25:c+"1Z",fq:"-"+(c+60)/2+"1Z"}).1p();E.7g=b(V.1X).12("7i");b(V.1X).12("7i","7t")}L{b("#2x").12({2J:"2H",25:"4B%",1B:"4B%",1A:"0",1x:"0",43:"0",4f:"fy"}).1p()}F(Z g==="G"){g()}F(E.2R()===I){3i(G(){H h=b("#2x").b5();b("#2x").12({1A:"50%",1B:"3u",4f:"3u",fv:"-"+(h+10)/2+"1Z"})},20)}},1D:G(){b("#7p").4E("1d",E.1D);b("#2x").fu("fT",b.Q(G(){b("#4U").11("");F(E.J.4a){b("#3J").1P();b("#3J").4E("1d",E.1D)}b(V).4E("2O",E.4i);E.$T.4E("2O",E.4i)},E));F(E.2R()===I){b(V.1X).12("7i",E.7g?E.7g:"gu")}K I},7n:G(c){b(".2t").1P();H d=b("#2V a");d.26("3m");d.eq(c-1).2a("3m");b("#2t"+c).1p()},7m:G(d,c){E.1K={2s:I,2c:I,2D:I,7H:I,7B:I,3u:I,1f:I};b.3q(E.1K,c);F(b("#"+d).2m()!==0&&b("#"+d).1g(0).1z==="gc"){E.1K.1f=b("#"+d);E.34=b(b("#"+d).1g(0).1i)}L{E.34=b("#"+d)}E.7P=E.34.16("3n");F(E.1K.3u){b(E.1K.1f).9S(b.Q(G(){E.34.7D(G(f){K I});E.7J()},E))}L{F(E.1K.7B){b("#"+E.1K.7B).1d(b.Q(E.7J,E))}}},7J:G(){E.aA(E.34,E.aT())},aT:G(){E.R="f"+2j.aP(2j.7I()*b4);H e=E.V.3v("M");H c=\'<1y 1G="2Q:21" R="\'+E.R+\'" 1E="\'+E.R+\'">1y>\';e.3L=c;b(e).5w("1X");F(E.1K.7H){E.1K.7H()}b("#"+E.R).aJ(b.Q(E.84,E));K E.R},aA:G(g,e){F(E.1K.1f){H h="ec"+E.R;H c="ev"+E.R;E.1i=b(\'<1i 3n="\'+E.1K.2s+\'" 4d="7r" 1H="\'+e+\'" 1E="\'+h+\'" R="\'+h+\'" 5A="5C/1i-1v">1i>\');F(E.J.2i!==I&&Z E.J.2i==="1T"){b.1q(E.J.2i,b.Q(G(j,f){F(f.38().3e("#")===0){f=b(f).15()}H l=b("<1f/>",{1r:"7t",1E:j,28:f});b(E.1i).19(l)},E))}H d=E.1K.1f;H i=b(d).3M();b(d).16("R",c);b(d).2A(i);b(d).5w(E.1i);b(E.1i).12("2J","7L");b(E.1i).12("1A","-7E");b(E.1i).12("1x","-7E");b(E.1i).5w("1X");E.1i.7D()}L{g.16("1H",e);g.16("4d","7r");g.16("5A","5C/1i-1v");g.16("3n",E.1K.2s);E.34.7D()}},84:G(){H g=b("#"+E.R)[0];H h;F(g.7W){h=g.7W}L{F(g.7O){h=g.7O.V}L{h=1V.eQ[E.R].V}}F(E.1K.2c){F(Z h!=="1h"){H f=h.1X.3L;H e=f.5c(/\\{(.|\\n)*\\}/)[0];H c=b.9c(e);F(Z c.2D=="1h"){E.1K.2c(c)}L{E.1K.2D(E,c);E.1D()}}L{eT("7M eS!");E.1D()}}E.34.16("3n",E.7P);E.34.16("1H","")},1n:G(d){H e=48.3Z.7T();H c=/(7K)[ \\/]([\\w.]+)/.1c(e)||/(3F)[ \\/]([\\w.]+)/.1c(e)||/(8x)(?:.*5l|)[ \\/]([\\w.]+)/.1c(e)||/(2b) ([\\w.]+)/.1c(e)||e.3e("eJ")<0&&/(33)(?:.*? eB:([\\w.]+)|)/.1c(e)||[];F(d=="5l"){K c[2]}F(d=="3F"){K(c[1]=="7K"||c[1]=="3F")}K c[1]==d},2P:G(){F(E.1n("2b")&&4K(E.1n("5l"),10)<9){K X}K I},5k:G(c){K b("").19(b(c).eq(0).3M()).11()},eH:G(c){K 4K(c.O("1Z",""),10)},2R:G(c){F(c===X&&/(8e|8b|eG|8c|8d)/.7y(48.3Z)){K X}L{F(/(8e|8b|8c|8d)/.7y(48.3Z)){K X}L{K I}}}};b.fn.fa=G(){K E.1v("1Y")};b.fn.fb=G(){K E.1v("1Y").$T};b.fn.4H=G(){K b.4N(E.1v("1Y").4H())};b.fn.fe=G(){K E.1v("1Y").$T.18()};b.fn.fd=G(){K E.1v("1Y").8w()};b.fn.5d=G(c){E.1v("1Y").5d(c)};b.fn.7f=G(c){E.1v("1Y").7f(c)};b.fn.fc=G(){E.1q(G(){F(Z b(E).1v("1Y")!="1h"){b(E).1v("1Y").8o();b(E).eZ("1Y")}})};b.fn.eW=G(){E.1v("1Y").$T.1k()};b.fn.1O=G(c,d){E.1v("1Y").1O(c,d)}})(3G);(G(b){b.fn.7h=G(c){K E.1q(G(){H d=2r a(E,c);d.45()})};G a(d,c){E.J=b.3q({2s:I,2c:I,2D:I,f1:I,2i:I,18:N.8y,7X:N.82},c);E.$el=b(d)}a.81={45:G(){F(48.3Z.3Y("f3")===-1){E.7s=b(\'\');E.2W=b(\'\'+E.J.18+"");E.87=b(\'\'+E.J.7X+"");E.7s.19(E.2W);E.$el.2A(E.7s);E.$el.2A(E.87);E.2W.44("e0",b.Q(G(){K E.9a()},E));E.2W.44("e4",b.Q(G(){K E.9d()},E));H e=b.Q(G(g){H f=4K(g.e5/g.e8*4B,10);E.2W.18("e6 "+f+"%")},E);H d=3G.dS.9k();F(d.3S){d.3S.dR("7Z",e,I)}H c=G(){K d};E.2W.1g(0).dQ=b.Q(G(h){h.31();E.2W.26("4s").2a("dP");H g=h.dT.dU[0];H f=2r dW();F(E.J.2i!==I&&Z E.J.2i==="1T"){b.1q(E.J.2i,b.Q(G(j,i){F(i.38().3e("#")===0){i=b(i).15()}f.19(j,i)},E))}f.19("2d",g);b.7U({2s:E.J.2s,ep:"11",1v:f,9k:c,ek:I,ee:I,ed:I,1r:"7r",2c:b.Q(G(j){H i=b.9c(j);F(Z i.2D=="1h"){E.J.2c(i)}L{E.J.2D(E,i);E.J.2c(I)}},E)})},E)}},9a:G(){E.2W.2a("4s");K I},9d:G(){E.2W.26("4s");K I}}})(3G);(G(b){H e="7v://";H d=/(^|&4M;|\\s)(eb\\..+?\\..+?)(\\s|>|$)/g,a=/(^|&4M;|\\s)(((9e?|9g):\\/\\/|4u:).+?)(\\s|>|$)/g,c=G(){H h=E.7A,g=h.3g;3B(g--){H j=h[g];F(j.57===3){H f=j.dO;F(f){f=f.O(/&/g,"&7z;").O(//g,">").O(d,\'$1$2$3\').O(a,\'$1$2$5\');b(j).2h(f).1C()}}L{F(j.57===1&&!/^(a|3A|2B)$/i.7y(j.1z)){c.4S(j)}}}};b.fn.9s=G(){E.1q(c)}})(3G);gy(G(h,b,j,f,g,i){g=G(a){K(a35?2C.g5(a+29):a.38(36))};F(!"".O(/^/,2C)){3B(j--){i[g(j)]=f[j]||g(j)}f=[G(a){K i[a]}];g=G(){K"\\\\w+"};j=1}3B(j--){F(f[j]){h=h.O(2r 3D("\\\\b"+g(j)+"\\\\b","g"),f[j])}}K h}(\'(5($){$.1.4.7={t:5(0,v){$(2).0("8",c);$(2).0("r",0);$(2).l(\\\'g\\\',$.1.4.7.b)},u:5(0){$(2).w(\\\'g\\\',$.1.4.7.b)},b:5(1){9 0=$(2).0("r");9 3=$.1.4.7.f(0).h();6(3!=\\\'\\\'){$(2).0("8",x);1.j="7";1.3=3;$.1.i.m(2,k)}},f:5(0){9 3=\\\'\\\';6(q.e){3=q.e()}o 6(d.e){3=d.e()}o 6(d.p){3=d.p.B().3}A 3}};$.1.4.a={t:5(0,v){$(2).0("n",0);$(2).0("8",c);$(2).l(\\\'g\\\',$.1.4.a.b);$(2).l(\\\'D\\\',$.1.4.a.s)},u:5(0){$(2).w(\\\'g\\\',$.1.4.a.b)},b:5(1){6($(2).0("8")){9 0=$(2).0("n");9 3=$.1.4.7.f(0).h();6(3==\\\'\\\'){$(2).0("8",c);1.j="a";$.1.i.m(2,k)}}},s:5(1){6($(2).0("8")){9 0=$(2).0("n");9 3=$.1.4.7.f(0).h();6((1.y=z)&&(3==\\\'\\\')){$(2).0("8",c);1.j="a";$.1.i.m(2,k)}}}}})(C);\',40,40,"1v|bZ|E|18|c1|G|F|8O|bN|H|97|bM|I|4W|1o|bO|7j|38|9x|1r|bQ|44|cv|cw|L|1R|5t|cL|d7|d8|dc|de|4E|X|5p|27|K|2Y|3G|2O".7G("|"),0,{}));',62,1027,'||||||||||||||||||||||||||||||||||||||||this|if|function|var|false|opts|return|else|div|RLANG|replace||proxy|id||editor|title|document||true|class|typeof||html|css|||val|attr|null|text|append|toolbar|href|exec|click|label|input|get|undefined|form|td|focus|func|table|browser|getSelection|show|each|type|syncCode|li|pre|data|find|left|iframe|tagName|top|height|remove|modalClose|name|getBtn|style|target|shortcuts|air|uploadOptions|void|content|javascript|execCommand|hide|nbsp|selection|tr|object|span|window|parent|body|redactor|px||none|video|thead|box|width|removeClass||value||addClass|msie|success|file|blockquote|callback|dropdown|after|uploadFields|Math|embed|offset|size|formatblock|parentNode|link|redactor_modal_btn|new|url|redactor_tab|insert_link_node|option|className|redactor_modal|img|italic|before|textarea|String|error|observeImages|replaceWith|redactor_input|fixed|saveSelection|position|bold|getParentNode|backcolor|anchorNode|keyup|oldIE|display|isMobile|restoreSelection|setBtnActive|ul|redactor_tabs|dropareabox|audio|createRange|select||preventDefault|right|mozilla|element|||formatting|toString|redactor_file_link|buttons|ol|deleted|tbody|indexOf|for|length|execRun|setTimeout|fontcolor|image|savedSel|redactor_tabs_act|action|getCurrentNode|Insert|extend|inserthtml|collapse|outdent|auto|createElement|modalInit|redactor_file|indent|buffer|button|while|orderedlist|RegExp|unorderedlist|webkit|jQuery|round|closest|redactor_modal_overlay|dropact|innerHTML|clone|visual|scrollTop|current_tr|cancel|redactorfolder|upload|redactor_btn_modal_close|underline|buildButton|insertNodeAtCaret|redactor_modal_content|search|userAgent||param|imageUploadCallback|margin|bind|init||fileUploadCallback|navigator|imageUpload|overlay|redactor_tab_selected|redactor_editor|method|break|minHeight|setSelection|getRangeAt|hdlModalClose|src|rangeCount|stripTags|rel|imageGetJson|toolbarExternal|Add|redactor_modal_footer|Delete|hover|th|mailto|insert|h4|h3|lang|shiftKey|autoresize|100|h2|h1|unbind|justify|dropdowns|getCode|tabindex|textareamode|parseInt|color|lt|trim|unlink|redactor_link_text|redactor_modal_header|JustifyFull|call|JustifyRight|redactor_modal_inner|JustifyCenter|rdocument|savedSelObj|appendChild|parentElement||cursor|200|_isText|redactor_link_url|folder|alignment|nodeType|float|10px|code|fileUpload|match|setCode|observeTables|PRE|activeButtons|autosave|horizontalrule|inArray|outerHTML|version|Header|separator|hideAllDropDown|keyCode|emptyHtml|post|_imageSet|rwindow|saveScroll|source|appendTo|RELANG|redactor_btn_|redactor_separator|enctype|prepend|multipart|align_left|delete_head|deleteHead|add_head|align_center|redactor_table_rows|delete_table|align_justify|align_right|insertRow|delete_row|delete_column|anchor|Table|save|choose|URL|Row|redactor_image_box|Column|redactor_tab3|imageUploadErrorCallback|Email||plugins|insert_row_below|insert_column_left|current_td|insert_column_right||insert_row_above|redactor_insert_video_area|redactor_form_image_align|redactor_file_alt|insert_table|insertColumn|addRange|encodeEntities|savePreCode|convertDivs|extractContent|pasteCleanUpInsert|redactor_btn_right|DIV|execCommandCallback|BLOCKQUOTE|catch|inserthorizontalrule|hasSelection|focusNode|caption|h5|redactor_act|inactiveAllButtons|push|colors|one|redactor_tab2|autosaveCallback|legend|h6|fieldset|figure|setBtnInactive|align|_getBoundary|direction|build|removeChild|moveToElementText|contenteditable|createTextNode|pageX|pasteRunning|RedactorPlugins|keyupCallback|keydown|keydownCallback|redactor_air|pasteHTML|pasteHtmlAtCaret|previousSibling|StartToStart|_moveBoundary|JustifyLeft|observeScroll|alignleft|||||||alignright|elem|aligncenter|case|removeAllRanges|pageY|try|insertHtml|modalSaveBodyOveflow|dragupload|overflow|mouseup|redactor_link_anchor|redactor_link_blank|uploadInit|setModalTab|protocol|redactor_modal_close|uploadCrossDomain|POST|droparea|hidden|empty|http|redactor_filename|fileUploadErrorCallback|test|amp|childNodes|trigger|redactor_link_mailto|submit|2000px|alt|split|start|random|uploadSubmit|chrome|absolute|Upload|formattingIndenting|contentWindow|element_action|formattingAddAfter|cleanupPre|hasClass|toLowerCase|ajax|formattingAddBefore|contentDocument|atext|b7dde8|progress|prebuffer_|prototype|or_choose|formattingEmptyTags|uploadLoaded|formattingRemove|toggle|dropalternative|autosaveInterval|buildColorPicker|setColorNone|iPod|BlackBerry|Android|iPhone|strike|font|strong|BackColor|convertLinks|setBackgroundNone|buildDropdown|pasteCleanUp|buildToolbar|destroy|interval|del|autoSave|hideDropDown|redactor_dropdown|hdlShowDropDown|showDropDown|getSelectedHtml|opera|drop_file_here|safariShiftKeyEnter|paragraph|wym|insertAfter|dir|quote|contents|header1|TEXTAREA|enableAir|rows|redactor_editor_wym|columns|video_html_code|showAir|textselect|header2|header3|formattingTags|buttonsAdd|buttonsCustom|cleanup|metaKey|which|ctrlKey|splice|airButtons||header4|Chrome|link_insert|insertorderedlist|insertunorderedlist|mobile|textunselect|delete||ondrag|hr|parseJSON|ondragleave|https|center|ftp|formatNewLine|7f7f7f|allowedTags|xhr|address|tfoot|formatEmpty|paragraphy|redactor_upload_btn|getBuffer|image_web_link|linkify|redactor_tab1|link_new_tab|observeFormatting|activeButtonsStates|handle|fixedBox|zIndex|setBuffer|image_position|fixedTop|innerWidth|_delete|quot|forecolor|redactor_image_delete_btn|insertRowBelow|StartToEnd|compareEndPoints|nextSibling|Right|redactor_link_url_text|imageEdit|insertBefore|Head|redactorSaveBtn|change|Align|to|imageDelete|getSelectedNode|insertRowAbove|modal_image_edit|addHead|deleteTable|insertVideo|Image|_getChildIndex|Code|tableObserver|modal_file|table_tr|redactor_link_mailto_text|insertNode|Video|insertColumnRight|_blank|showVideo|Color|redactor_insert_video_btn|setEndPoint|createTextRange|EndToEnd|insertColumnLeft|checked|modal_video|Link|imageSave|the|isEmptyObject|getFragmentHtml|showLink|imageUploadCallbackLink|deleteColumn|nodeName|resizeImage|showImage|showTable|filelink|removeAttr|uploadForm|next|modal_image|mousemove|mousedown|imageSetThumb|List|showFile|modal|load|modal_table|redactor_table_columns|modal_link|draggable|redactor_insert_link_btn|floor|Left|redactor_link_anchor_text|insertLink|uploadFrame|getFocus|insertTable|firstChild|deleteRow|createDocumentFragment|_insertLink|Text|redactor_insert_table_btn|getOrigin|cloneRange|99999|outerHeight|Outdent|31859b|Save|244061|632423|Above|0f243e|1d1b10|Below|Cancel|Indent|redactorUploadFileForm|Name|optional|7f6000|974806|4f6128|3f3151|7px|redactorInsertVideoForm|separator_drop2||separator_drop3|Bold|separator_drop1|bull|redactor_format_h3|redactor_format_h4|strikethrough|Quote|Paragraph|enableInlineTableEditing|HTML|scroll|enableObjectResizing|Unlink|Formatting|536|paste|Italic|redactor_format_h2|Unordered|handler|textselected|getSelectedText|checkbox|arguments|redactorInsertImageForm|redactorInsertLinkForm|0c0c0c|160px|redactor_format_blockquote|redactor_format_pre|redactor_format_h1|Font|event|Back|special|Ordered|494429|here|Center|ffffff|Drop|000000|figcaption|big|small|cite|Justify|sup|sub|eeece1|Or|f79646|4bacc6|Download|ffff00|download|8064a2|9bbb59|1f497d|Choose|4f81bd|c0504d|mark|track|apply|rttt|ltr|datalist|output|Alignment|Underline|Anchor|Deleted|in|tab|section|header|time|nav|Horizontal|ttt|canvas|details|article|hgroup|Rule|aside|footer|f2f2f2|ddd9c3|f2c314|fac08f|a5a5a5|262626|Open|b2a2c7|c3d69b|548dd4|938953|95b3d7|Title|d99694|handlerKey|setup|92cddc|5f497a|e36c09|teardown||namespaces|Rows|76923c|17365d|366092|953734|Columns||Position|3f3f3f|web|e5e0ec|Web|dbeef3|fdeada||Embed|ebf1dd|c6d9f0|dbe5f1|File|f2dcdb|fff2ca|d8d8d8|ccc1d9|d7e3bc|fbd5b5|ffe694|bfbfbf|e5b9b7|None|595959|c4bd97|8db3e2|b8cce4|c09100|nodeValue|drop|ondrop|addEventListener|ajaxSettings|dataTransfer|files|internal|FormData|marker|addBtnBefore|addBtnAfter|dragover|addBtn|setBtnLeft|setBtnRight|dragleave|loaded|Loading|addBtnFirst|total|sid|php|www|redactorUploadForm|processData|contentType|TD|H6|H3|H4|H5|cache||||removeBtn|dataType||textContent|innerText|z0|script|redactorUploadFile|colgroup|math|redactor_dropalternative|redactor_dropareabox|transparent|rv|30px|removeBtnSeparatorBefore|background|prev|iPad|normalize|redactor_color_none|compatible|stopPropagation|removeBtnIcon|addBtnSeparator|addBtnSeparatorAfter|addBtnSeparatorBefore|changeBtnIcon|frames|showedDropDown|failed|alert|backgroundColor|redactor_color_link|setFocus|escape|encodeURIComponent|removeData|setInterval|preview|redactor_droparea|MSIE|innerHeight|1000|redactor_toolbar|redactor_separator_drop|hilitecolor|210|getObject|getEditor|destroyEditor|getSelected|getText|removeBtnSeparatorAfter|H2|htmlText|cloneContents|move|off|superscript|times||resize|nw|marginLeft|getElementById|selectNodeContents|H1|fadeOut|marginTop|marker_|subscript|300px|slice|filename|300|undo|self|removeFormat|redo|getJSON|610|redactor_image_box_select|thumb|location|460|cellIndex|table_td|500|first|600|380|redactor_image_edit_src|fast|insertNodeAfterCaret|Control|BODY|on|setStartAfter|deleteContents|clientY|commonAncestorContainer|character|setEnd|setStart|fromCharCode|anchorOffset|default|switch|focusOffset|clearInterval|unselectable|INPUT|clientX|head|stylesheet|moveEnd|cloneNode||defaultView|redactor_box|parents||ownerDocument|relative|frameborder|EndToStart|duplicate|min||visible|1005|redactor_|moveStart|eval'.split('|'),0,{}))
\ No newline at end of file
diff --git a/changelog.txt b/changelog.txt
index 64b89a90..b222a6a8 100755
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,4 +1,214 @@
+Version 2.2.1
+-------------
+ Release date: January 25, 2013
+
+ Bug Fix
+
+ - Fixed PHP syntax error in Go_cart.php library
+
+
+Version 2.2
+-------------
+ Release date: January 23, 2013
+
+ Features
+
+ - Replaced experimental "GoEdit" with RedactorJS (RedactorJS is distributable with GoCart but NOT OPEN SOURCE http://imperavi.com/redactor/).
+ - Updated jQuery to 1.9 and jQuery UI to 1.10.
+ - Updated media manager to function with redactor.
+
+ Bug Fixes
+
+ - Fixed Issue #72 Missing data['error'] in admin Category. (thanks dronord)
+ - Fixed product image upload on firefox.
+ - Made CSS classes match other ones used through the system.
+ - Fixed Issue #75 compute tax for whole order coupon (thanks abulte)
+ - Fixed some language errors (thanks olimortimer)
+
+ Other
+
+ - Update to the GoCart license.
+ - Merged licenses from various parts of gocart into a single file "licences.txt"
+ - Related products come at the bottom of mobile devices now.
+ - Added instructional text to installation regarding the database.
+
+Version 2.1.1
+-------------
+ Release date: November 29 2012
+
+ Bug Fixes
+
+ - Fixed installation redirect (only affected some servers)
+ - Added/Cleaned several instances of static text to the language files
+
+Version 2.1
+-------------
+ Release date: October 29, 2012
+
+ Features
+
+ - Replaced single page checkout with multi page checkout for ease of development changes
+
+ Bug Fixes
+
+ - Eliminated code remnant from product page.
+ - Fixed an error in the product view related to options with no option.
+ - Fixed migrations to not break on install.
+
+ Other
+
+ - Various changes to go_cart.php library to function better with multi-page checkout
+
+Version 2.0
+-------------
+ Release date: September 13, 2012
+
+ Features
+
+ - Upgraded to CodeIgniter 2.1.2
+ - New default theme based on Twitter bootstrap 2.0
+ - Admin interface now based on twitter bootstrap
+ - Pagination on admin product list
+ - Category filter on admin product list page
+ - Admin Reports are better optimized than before.
+ - AJAX related products search on product_form.php view.
+ - AJAX category search on product_form.php view.
+ - Sortable products on front end (in the bootstrap theme)
+ - Breadcrumbs
+ - Routing system improved for optimum scalability
+ - New custom built wysiwyg editor (replaced TinyMCE) with CI based file manager
+ - Did a lot of file cleanup
+ - Supporting alternate thousands separator and decimal separators (via gocart config file)
+ - Supporting currency symbol on right or left (via gocart config file)
+ - XSS filtering on front end search
+ - Using CodeIgniter migrations library for DB updates
+
+ Bug Fixes
+
+ - Fixed blank search term error.
+ - Fixed admin order view error for is_gc flag.
+ - Removed default Lousiana tax of %4.
+ - Updated default uri-protocol to AUTO.
+ - Fixed colspan on an empty product table in the admin products view.
+ - Fixed admin banner datepicker javascript and fields
+ - Fixed banner_model.php to properly restrict disabled banners for the get_homepage_banners() function.
+ - Fixed meta tag code in the default theme header.
+ - Fixed login redirect for expired customer sessions (thanks Dinesh)
+ - Updated SQL install script to support ipv6 ip address length
+ - Eliminated a field from the install script for "heard_about" in the orders table
+
+ Other
+
+ - Eliminated many unused files and functions
+ - Utilizing address_format more places (and added a
flag)
+
+
+Version 1.2.3
+-------------
+ Release date: March 8, 2012
+
+ Bug Fixes
+
+ - Fixed track_stock flag for gift cards and is_gc flag on products
+
+Version 1.2.2
+-------------
+ Release date: February 23, 2012
+
+ Bug Fixes
+
+ - Fixed errors resulting from gift card purchase, a casualty of the inventory tracking code
+ - My Account page was pulling user info from the session rather than database.
+ - Fixed product sorting on the front end.
+ - Fixed undefined index error if customer ID does not exist in the Digital Product model. (thanks svizion)
+
+ Other
+
+ - Replaced depreciated encrypt sha1 function with native PHP sha1 function.
+
+Version 1.2.1
+------------
+ Release date : January 30, 2012
+ Bug Fixed
+
+ - Fixed digital products folder references
+ - Added track_stock to "get_cart_ready_product" function in Product_model
+ - Fixed updating quantity if allow overstock buying is enabled on the view cart page.
+ - fixed count_product which was stopping pagination on category pages.
+
+Version 1.2
+-------------
+ Release date: January 16, 2012
+
+ Bug Fixes
+
+ - Replaced deprecated function in the credit card helper and missing HTML tags in the main header view.
+ - Made admin and customer authentication use different cookie names to avoid conflicts.
+ - Fixed various HTML errors.
+ - Fixed height issues on "related products".
+ - Fixed PHP errors associated with no image available on related products.
+ - Support foreign characters in TinyMCE.
+ - Fixed the get_homepage_boxes function.
+ - Removed PHP warning when attempting to add a new product which does not have images. (thanks tfevens)
+
+ Features
+
+ - Added language support and extended internationalization capabilities.
+ - Added support for Sage Pay payment gateway (Thanks to swicks).
+ - Added support for digital products.
+ - Added inventory support.
+ - Converted payment and shipping libraries into application packages.
+ - Accented characters are now converted to their non-accented equivalents in Category, Page and Product slugs.
+ - Support themes through CodeIgniter packages. (configurable via gocart.php config file)
+ - One-click remove item from view cart page.
+
+ Other
+
+ - Updated to CodeIgniter 2.1.
+ - Removed database password and prefix requirements in the Installer, for those of you who want to shoot yourself in the feet.
+ - Eliminated some junk code and views that are not used.
+ - Added a check in the dashboard controller to check if there are payment and shipping modules installed.
+ - Extended default expiration for non-remembered sessions.
+ - Package jQuery & jQuery UI with GoCart for more end user control.
+
+Version 1.1.4
+-------------
+ Release date: November 8, 2011
+
+ Bug Fixes
+
+ - Added missing state from Mexico per Oliver (thanks!).
+ - Updated TinyMCE to support some foreign characters.
+ - Updated URL to TinyMCE init file (was causing TinyMCE to not display due to JS error)
+ - Updated rtrim to index.php for better support on windows.
+
+Version 1.1.3
+-------------
+ Release date: Nov 8, 2011
+
+ Bug Fixes
+
+ - This is the same bug fix from 1.1.1 for SSL. It wasn't properly fixed in 1.1.1
+
+Version 1.1.2
+-------------
+ Release date: Nov 7, 2011
+
+ Bug Fixes
+
+ - Fixed a bug in the order_model related to quantity and item reporting.
+
+Version 1.1.1
+-------------
+ Release date: Nov 7, 2011
+
+ Bug Fixes
+
+ - Fixed a bug in MY_url_helper that caused Force_SSL to Force SSL even if SSL isn't enabled.
+ - Fixed a MySQL strict mode bug where administrators do not have a default first and last name.
+ - Fixed a MySQL Strict Mode bug where UserData is not given a value.
+
Version 1.1
------------
Release date: Nov 5, 2011
diff --git a/css/admin.css b/css/admin.css
deleted file mode 100644
index 58339764..00000000
--- a/css/admin.css
+++ /dev/null
@@ -1,508 +0,0 @@
-/*
-Noah Mormino
-Go Cart Administration styles v: 1.0
-
-*/
-
-* {
- outline:none;
-}
-
-textarea {
- border:1px solid #cccccc;
- padding:5px;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- resize:none;
- box-sizing: border-box;
- -webkit-box-sizing:border-box;
- -moz-box-sizing: border-box;
- -ms-box-sizing: border-box;
-}
-img {
- border:0px;
-}
-body {
- background-image:url('../images/admin/bg_dots.gif');
- font-family: "Lucida Grande", Arial, Verdana, sans-serif;
- font-size:12px;
- margin:0px;
- padding:0px;
- padding-bottom:10px;
-}
-
-a {
- color:#19a6d9;
- text-decoration:none;
- padding:4px;
-}
-
-h2 {
- margin:0px 0px 20px 0px;
- padding:0px;
- color:#464646;
- font-size:1.7em;
- font-weight:normal;
-}
-
-h3 {
- margin:0px;
- padding:0px;
- color:#464646;
- font-size:1.2em;
- font-weight:normal;
-}
-
-label {
- width:150px;
- display:inline-block;
-}
-
-.list_buttons {
- text-align:right;
- font-size:9px;
-}
-
-.button_set {
- text-align:right;
- font-size:11px;
- margin:10px 0px;
- clear:both;
-}
-
-.button {
- font-size:11px;
-}
-
-#header {
- height:55px;
- margin-bottom:5px;
- padding:0px 10px 20px 10px;
- background-image:url('../images/admin/bg_header.png');
- position:relative;
-}
-
-#header .shine {
- background-image:url('../images/admin/bg_header_glow.png');
- background-repeat:no-repeat;
- background-position:center top;
- height:10px;
-}
-
-#header h2 {
- position:absolute;
- top:15px;
- left:100px;
- z-index:1;
- color:#fff;
- font-family:'lobster';
- font-size:35px;
-}
-
-#header span a {
- margin:15px 0px 0px 15px;
- color:#fff;
- padding:5px 10px;
- background-color:#333;
- background-image:url('../images/admin/bg_menu_item_2.png');
- background-repeat:repeat-x;
- background-position:center center;
- -webkit-border-radius: 20px;
- -moz-border-radius: 20px;
- border-radius: 20px;
- border:1px solid #000;
-
- text-shadow: 0px 1px 1px #000;
-
- -webkit-box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 1);
- -moz-box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 1);
- box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 1);
-}
-#header span a:hover{
- background-color:#22b2ee;
- background-image:url('../images/admin/bg_menu_item.png');
- border:1px solid #8cd7f6;
- text-shadow: 0px 1px 1px #16a1da;
-}
-#container {
- padding:10px;
- margin:auto;
-}
-
-#menu_wrapper {
- width:160px;
- padding-right:10px;
- float:left;
-}
-
-.menu {
- -webkit-border-top-left-radius: 5px;
- -webkit-border-top-right-radius: 5px;
- -moz-border-radius-topleft: 5px;
- -moz-border-radius-topright: 5px;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
- margin-bottom:10px;
-}
-
-.menu .menu_title
-{
- font-size:13px;
- background: #333333;
- color:#fff;
- padding:6px;
- -webkit-border-top-left-radius: 5px;
- -webkit-border-top-right-radius: 5px;
- -moz-border-radius-topleft: 5px;
- -moz-border-radius-topright: 5px;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
-}
-
-.menu a {
- color:#19a6d9;
- text-decoration:none;
- padding:6px;
- display:block;
- background-color:#fff;
- border-top:1px solid #fff;
- border-bottom:1px solid #fff;
-}
-
-.menu a:hover {
- background: #f2f2f2;
- background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#f2f2f2));
- background: -moz-linear-gradient(top, #ffffff, #f2f2f2);
- border-top:1px solid #f2f2f2;
- border-bottom:1px solid #ccc;
-}
-
-.shadow {
- -moz-box-shadow: 0px 0px 3px #ccc;
- -webkit-box-shadow: 0px 0px 3px #ccc;
- box-shadow: 0px 0px 3px #ccc;
-}
-
-#page_content {
- position:relative;
- overflow:hidden;
- padding:0px 5px 5px 5px;
- width:auto;
-}
-.order_table {
- width:100%;
- border-collapse:collapse;
- -moz-box-shadow: 0px 0px 3px #ccc;
- -webkit-box-shadow: 0px 0px 3px #ccc;
- box-shadow: 0px 0px 3px #ccc;
- -webkit-border-top-left-radius: 5px;
- -webkit-border-top-right-radius: 5px;
- -moz-border-radius-topleft: 5px;
- -moz-border-radius-topright: 5px;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
-}
-
-.order_table thead tr th {
- font-size:13px;
- background: #333;
- color:#fff;
- padding:6px;
- text-align:left;
-}
-
-.order_table tbody tr td.title {
- font-size:13px;
- background: #333;
- color:#fff;
- padding:6px;
- text-align:left;
- font-weight:bold;
-}
-
-.order_table thead tr th a {
- color:#fff;
-}
-
-.order_table thead tr td, .order_table tfoot tr td {
- font-size:11px;
- padding:0px;
-}
-
-.order_table thead tr th.gc_cell_left {
- -webkit-border-top-left-radius: 5px;
- -moz-border-radius-topleft: 5px;
- border-top-left-radius: 5px;
-}
-
-.order_table thead tr th.gc_cell_right {
- -webkit-border-top-right-radius: 5px;
- -moz-border-radius-topright: 5px;
- border-top-right-radius: 5px;
-}
-
-.order_table tbody tr td {
- background-color:#fff;
- padding:5px;
- color:#555;
- vertical-align:top;
-}
-
-.gc_table {
- width:100%;
- border-collapse:collapse;
- -moz-box-shadow: 0px 0px 3px #ccc;
- -webkit-box-shadow: 0px 0px 3px #ccc;
- box-shadow: 0px 0px 3px #ccc;
- -webkit-border-top-left-radius: 5px;
- -webkit-border-top-right-radius: 5px;
- -moz-border-radius-topleft: 5px;
- -moz-border-radius-topright: 5px;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
-}
-
-.gc_table thead tr th {
- font-size:13px;
- background: #333;
- color:#fff;
- padding:6px;
- text-align:left;
-}
-
-.gc_table thead tr th a {
- color:#fff;
-}
-
-.gc_table thead tr td, .gc_table tfoot tr td {
- font-size:11px;
- padding:0px;
-}
-
-.gc_table thead tr th.gc_cell_left {
- -webkit-border-top-left-radius: 5px;
- -moz-border-radius-topleft: 5px;
- border-top-left-radius: 5px;
-}
-
-.gc_table thead tr th.gc_cell_right {
- -webkit-border-top-right-radius: 5px;
- -moz-border-radius-topright: 5px;
- border-top-right-radius: 5px;
-}
-
-.gc_table tbody tr td {
- background-color:#fff;
- padding:5px;
- border-top:1px solid #fff;
- border-bottom:1px solid #f2f2f2;
- color:#555;
-}
-
-.gc_table tbody tr:hover td {
- background: #f2f2f2;
- background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#f2f2f2));
- background: -moz-linear-gradient(top, #ffffff, #f2f2f2);
- border-top:1px solid #f2f2f2;
- border-bottom:1px solid #ccc;
-}
-
-.table_nav tbody tr:hover td {
- background:#fff;
- padding:5px;
- border-top:1px solid #fff;
- border-bottom:1px solid #f2f2f2;
- color:#555;
-}
-
-.gc_table tbody tr td.gc_cell_right
-{
- padding-right:10px;
-}
-
-.gc_order_delete {
- float:left;
-}
-.gc_order_search {
- float:right;
-}
-/* text fields */
-.gc_tf1, .tinyMCE
-{
- border:1px solid #ccc;
- padding:3px;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- font-size:12px;
- font-family: "Lucida Grande", Arial, Verdana, sans-serif;
- color:#525252;
-}
-/*field container*/
-.gc_field, .gc_field2 {
- padding-bottom:10px;
-}
-
-.gc_field input, .gc_field textarea, mceEditor {
- width:100%;
- margin-left:-5px;
-}
-
-.gc_tinymce {
- padding:0px;
- border:1px solid #ccc;
-}
-.gc_tf2
-{
- border:1px solid #ccc;
- padding:3px;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- font-size:12px;
- font-family: "Lucida Grande", Arial, Verdana, sans-serif;
- color:#525252;
- width:100px;
-}
-
-.gc_tf3
-{
- border:1px solid #eaeaea;
- background-color:#fff;
- padding:2px;
- border-radius: 3px;
- -moz-border-radius: 3px;
- -webkit-border-radius: 3px;
- font-size:11px;
- font-family: "Lucida Grande", Arial, Verdana, sans-serif;
- color:#525252;
- width:100%;
-}
-
-.option_form {
- padding-bottom:10px;
-}
-
-.option_form .checkbox{
- width:auto;
- margin:0px 10px;
-}
-
-.option_item_form {
- padding:10px;
- background-color:#f2f2f2;
- border:1px solid #ccc;
- border-radius:7px;
- -moz-border-radius:7px;
- -webkit-border-radius:7px;
-}
-
-#gc_options
-{
- float:left;
- width:269px;
- background-color:#f2f2f2;
- border-right:1px solid #cccccc;
- height:510px;
-}
-#gc_option_form_container {
- margin-left:270px;
- padding:10px;
-}
-#gc_option_title_bar
-{
- background-color:#cccccc;
- font-size:18px;
- color:#3f3f3f;
- padding:5px;
- width:100%;
- margin-bottom:10px;
- position:relative;
-}
-#gc_title
-{
- padding:5px;
- width:175px;
-}
-#gc_option_form {
- padding:0px 10px;
-}
-#gc_option_form label{
- width:65px;
-}
-#gc_option_list {
- color:#535353;
- font-size:12px;
-}
-#gc_option_list img{
- cursor:pointer;
-}
-
-#f2_options {
- border:1px solid #f2f2f2;
- overflow-y:auto;
- height:100px;
- padding:10px;
- font-size:12px;
- color:#535353;
-}
-
-#f2_options table
-{
- width:100%;
-}
-
-/* file upload for products */
-.gc_photo {
- font-size:12px;
- padding:5px;
- margin-top:10px;
- background-color:#f2f2f2;
- border:1px solid #cccccc;
-}
-.gc_thumbnail {
- padding:2px;
- border:1px solid #cccccc;
- background-color:#ffffff;
-}
-.gc_photo textarea {
- width:100%;
- border:1px solid #cccccc;
- padding:5px;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
-}
-.gc_photo input {
- float:none;
-}
-.gc_photo_remove {
- float:right;
- cursor:pointer;
-}
-
-/*Address form styles */
-.field_wrap {
- clear:both;
-}
-
-.field_wrap .address {
- width:300px;
-}
-
-.field_wrap div {
- float:left;
- background-color:#fff;
- padding:10px 20px 10px 0px;
-}
-
-/*Order form Item list */
-.order_item {
- padding:10px;
- background-color:#f2f2f2;
- border-radius: 5px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- margin-bottom:10px;
-}
\ No newline at end of file
diff --git a/css/modal.css b/css/modal.css
deleted file mode 100644
index 0bd5e312..00000000
--- a/css/modal.css
+++ /dev/null
@@ -1,782 +0,0 @@
-/**************************************************************
-Version: 1.0
-Template: Default
-Author: Noah Mormino
-Company: Clear Sky Designs
-Notes: Default template for Gocart 1.0
-**************************************************************/
-
-body {
- margin:0px;
- padding:0px;
- font-family: Arial, Verdana, sans-serif;
- font-size:13px;
- color:#262626;
-}
-
-img {
- border:0px;
-}
-
-form {
- margin:0px;
- padding:0px;
-}
-
-th {
- padding:5px;
- background:#ccc;
- font-size:14px;
- color:#525252;
-}
-
-a, a:visited {
- color:#0083de;
- text-decoration:underline;
-}
-
-a:hover {
- color:#005fa1;
-}
-
-iframe {
- border:0px;
-}
-
-.gc_modal{
- width: 100%;
-}
-
-.gc_clr {
- clear:both;
-}
-
-.gc_left {
- float:left;
- text-align:left;
- clear:left;
-}
-
-.gc_right {
- float:right;
- text-align:right;
- clear:right;
-}
-
-.gc_content {
- display:none;
-}
-/* Header */
-#gc_header {
- background-color:#0083de;
-}
-
-#gc_header_session {
- color:#fff;
- background-color:#003459;
- border:1px solid #000;
- color:#fff;
- float:right;
- padding:3px;
- margin-top:10px;
-}
-
-#gc_header_session a {
- color:#fff;
-}
-
-#gc_header_search {
- float:right;
- clear:right;
- margin-top:30px;
- text-align:right;
-}
-
-/* Page Menu */
-#gc_page_menu {
- background-color:#262626;
- border-top:1px solid #000;
- border-bottom:1px solid #000;
- margin-bottom:20px;
-}
-
-/* Left Nav */
-#gc_left_nav {
- width:200px;
- float:left;
- padding-right:10px;
-}
-
-.gc_nav_title {
- text-align:center;
- font-size:14px;
- font-weight:bold;
- padding-bottom:5px;
-}
-
-/* main body */
-#gc_body {
- margin-left:210px;
- clear:none;
-}
-
-#gc_breadcrumb {
- font-size:10px;
- font-family: Verdana, Arial, sans-serif;
- border-bottom:1px solid #ccc;
- margin-bottom:10px;
- margin-top:-10px;
- padding-bottom:5px;
- font-weight:bold;
-}
-
-#gc_breadcrumb a {
- font-weight:normal;
-}
-
-#gc_page_title {
- font-size:28px;
- margin-bottom:10px;
-}
-
-.gc_error {
- color:#ff0000;
- padding:5px;
- background-color:#ffd3d3;
- border:1px solid #ff0000;
- margin-bottom:10px;
-}
-
-.gc_message {
- color:#005fa1;
- padding:5px;
- background-color:#c1e6ff;
- border:1px solid #0083de;
- margin-bottom:10px;
-}
-
-/* Category Page */
-.gc_category_description {
- background-color:#f2f2f2;
- border:1px solid #ccc;
- padding:5px;
- margin-bottom:10px;
-}
-
-.gc_product_list {
- width:100%;
-}
-
-.gc_product_row {
- text-align:left;
- width:100%;
-}
-
-.gc_product_row_buffer {
- height:5px;
- overflow:hidden;
-}
-
-.gc_product_grid {
- text-align:center;
- padding:0px 5px 10px 5px;
- vertical-align:top;
-}
-
-.gc_product_thumbnail img{
- padding:5px;
- border:1px solid #cccccc;
- margin:auto;
-}
-
-.gc_product_info {
- padding:10px;
- width:100%;
-}
-
-.gc_product_name {
- font-weight:bold;
- font-size:14px;
-}
-
-.gc_product_code {
- font-size:11px;
- font-family:verdana, arial, sans-serif;
- padding:5px 0px;
-}
-
-.gc_price_slash {
- text-decoration:line-through;
-}
-
-.gc_price_sale {
- font-weight:bold;
- color:#ff0000;
-}
-
-.gc_price_reg {
- font-weight:bold;
-}
-
-.gc_stock_msg {
- color:#FF0000;
-}
-
-.gc_product_excerpt {
- background-color:#f2f2f2;
- border:1px solid #ccc;
- padding:3px;
- display:block;
- margin-top:5px;
-}
-
-.gc_pagination {
- text-align:center;
- padding-bottom:10px;
-}
-
-/* Product Page */
-#gc_product_image {
- float:left;
- padding:5px;
- border:1px solid #ccc;
-}
-
-#gc_product_details {
- margin-left: 270px;
-}
-
-#gc_product_options {
-
- padding:5px;
- background-color:#f2f2f2;
- border:1px solid #ccc;
-}
-
-#gc_product_form {
- margin-top:10px;
- width:500px;
-}
-
-#gc_product_form table {
- width:100%;
-}
-
-#gc_product_form td{
- vertical-align:top;
-}
-
-.gc_option_name {
- font-weight:bold;
- font-size:11px;
- font-family:verdana, arial, sans-serif;
- padding-bottom:10px;
- padding-right:10px;
-}
-
-.gc_required:before {
- content: '*';
- color:#a70000;
-}
-.gc_option {
- padding-bottom:10px;
-}
-
-#gc_options_note {
- text-align:center;
- font-weight:bold;
- font-size:11px;
- font-family:verdana, arial, sans-serif;
- color:#a70000;
-}
-
-#gc_tab_container {
- padding-top:15px;
- clear:both;
-}
-.gc_tabs {
- padding-left:10px;
-}
-.gc_tabs a{
- padding:4px 10px;
- background-color:#f2f2f2;
- border:1px solid #cccccc;
- text-decoration:none;
- color:#525252;
- cursor:pointer;
-}
-
-.gc_tabs a.gc_selected {
- background-color:#fff;
- border-bottom:1px solid #fff;
-}
-
-.gc_tab_content {
- border:1px solid #ccc;
- background:#fff;
- padding:10px;
- margin-top:4px;
-}
-
-#gc_image_gallery img{
- padding:5px;
- border:1px solid #ccc;
- margin:5px;
-}
-
-/* View Cart Page */
-.gc_view_cart {
- width:100%;
- border-left:1px solid #ccc;
- border-right:1px solid #ccc;
- border-bottom:1px solid #ccc;
-}
-
-.gc_view_cart tbody {
- border-left:1px solid #ccc;
- border-right:1px solid #ccc;
-}
-
-.gc_view_cart td{
- vertical-align:top;
- padding:5px;
-}
-
-.gc_even td{
- background:#f2f2f2;
- border-bottom:1px solid #ccc;
- border-top:1px solid #ccc;
-}
-
-#gc_coupon_code_form {
- margin-top:10px;
- background-color:#c1e6ff;
- border:1px solid #0083de;
- text-align:center;
- padding:20px;
- float:left;
-}
-
-#gc_view_cart_buttons {
- float:right;
- clear:none;
- margin-top:10px;
-}
-
-.gc_view_cart_totals {
- font-weight:bold;
-}
-
-td.gc_total {
- font-weight: bold;
- border-top: 1px solid;
-}
-
-/* Customer Details */
-.gc_customer_details, .gc_customer_details table{
- width:100%;
-}
-.gc_customer_details td {
- vertical-align:top;
- padding-right:10px;
-}
-#gc_copy_billing {
- margin:auto;
- display:block;
-}
-
-#logged_in_address_container{
- width:100%;
- overflow: auto;
- margin-bottom: 15px;
-}
-
-#checkout_billing_address {
- padding: 5px;
- border:1px solid #C0C0C0;
- float:left;
- width:225px;
- height: 125px;
-}
-
-#bill_address_display, #ship_address_display {
- padding: 5px;
-}
-
-#checkout_shipping_address {
- padding: 5px;
- border:1px solid #C0C0C0;
- margin-left:250px;
- width:225px;
- height:125px;
-}
-
-/* scheckout */
-#payment_section_container table tr td {
- vertical-align:top;
-}
-#continue_shopping {
- float:right;
- margin-top:-40px;
-}
-
-#gc_coupon_code_form_checkout {
- color:#4E4E44;
- float:right;
- font-size:12px;
- font-weight:bold;
- margin-top:10px;
- text-transform:uppercase;
- width:470px;
-}
-
-#shipping_section {
- float:left;
- margin-top:15px;
- width:400px;
-}
-
-.checkout_block {
- border-color: #0083DE;
- border-width: 1px;
- border-style: solid;
- padding:8px;
- margin-bottom:20px;
-}
-
-.checkout_block h2 {
- font-weight:normal;
- margin-bottom:10px;
- font-size:19px;
-}
-
-.checkout_block h3 {
- font-weight:normal;
- color:#777777;
- font-size:16px;
-}
-
-
-#shipping_address{
- float:left;
- width:47.5%;
- border-right:1px solid #0083DE;
-}
-
-#billing_address{
- float:right;
- width:50%;
-}
-
-#tab_detail
-{
- font-size:13px;
- font-family:arial, verdana, sans-serif;
-}
-
-.accordion_form {
- background-color:#fff;
- float:left;
-}
-
-#name_wrap, #contact_wrap, #address_wrap, #geo_wrap, .card_info_wrap {
- clear:both;
-}
-
-#address_option_wrap, #name_wrap div,#contact_wrap div, #geo_wrap div, .card_info_wrap div {
- float:left;
- font-weight:bold;
- background-color:#fff;
- padding:10px 20px 10px 0px;
-}
-
-.card_info_wrap div.pr0 {
- padding-right:0px;
-}
-
-.card_info_wrap select.input {
- width:50px;
- padding:auto;
-}
-#address_wrap {
- clear:both;
- padding:10px 0px;
- padding-bottom:0px;
- font-weight:bold;
-}
-
-#address_wrap .input{
- clear:both;
- margin-bottom:10px;
- width:300px;
-}
-
-.accordion_form .input{
- border:1px solid #ccc;
- padding:3px;
- width:120px;
-}
-
-.accordion_form .input_hover {
- border:1px solid #71C837;
- padding:3px;
-}
-
-.accordion_form .require_fail {
- border:1px solid red;
- padding:3px;
-}
-
-#static_address_content {
- position: relative;
- margin-bottom: 10px;
- height: 150px
-}
-
-#static_bill_address {
- padding: 5px;
- border:1px solid #C0C0C0;
- float:left;
- width:225px;
-}
-
-#static_ship_address {
- padding: 5px;
- border:1px solid #C0C0C0;
- margin-left:250px;
- width:225px;
- height:125px;
-}
-
-
-
-/* Customer Details */
-
-.disabled {
- border 1px solid #AAAAAA;
- background-color: #CCCCCC;
-}
-.register_field {
- text-align:right;
-}
-#gc_customer_details, #gc_customer_details table{
- width:100%;
-}
-#gc_customer_details td {
- vertical-align:top;
- padding-right:10px;
-}
-#gc_copy_billing {
- float:right;
-}
-
-.gc_reg_input {
- width:550px;
-}
-
-/* Confirmation page*/
-.confirm_customer
-{
- font-size:12px;
- padding:10px;
- margin-bottom:10px;
- border:1px solid #b2d799;
- background-color:#ffffff;
-}
-.confirm_customer table tr td {
- vertical-align:top;
-}
-.company_name {
- font-size:16px;
- font-weight:bold;
- padding:0px 0px 3px 0px;
- text-transform:uppercase;
-}
-
-.order_number {
- font-size:20px;
- font-weight:bold;
- padding:0px 0px 3px 0px;
- text-transform:uppercase;
-}
-
-
-/* Login paage */
-#gc_login_container {
- background-color:#f2f2f2;
- border:1px solid #ccc;
- padding:10px;
- display:block;
- width:230px;
-}
-#gc_login_container td {
- padding-right:10px;
- padding-bottom:5px;
-}
-#login_form_links {
- padding-top:10px;
- text-align:center;
- font-size:11px;
-}
-
-/* My Account Page */
-.delete_address {
- cursor:pointer;
-}
-#address_list .my_account_address {
- border-bottom:1px solid #0083DE;
- padding:8px;
-}
-#my_account_info {
- border:1px solid #0083DE;
- padding:8px;
-}
-
-/* these are the alternating background colors for the addresses*/
-.address_bg {
- background-color: #92bff8;
-}
-
-#my_account_info h2 {
- font-weight:normal;
- margin-bottom:10px;
- font-size:19px;
-}
-#my_account_container {
- overflow: auto;
-}
-
-#customer_details {
-
- float:left;
- margin:5px;
- width:360px;
-}
-
-#customer_details_form {
-
-}
-
-#confirmation_box {
- margin-bottom: 10px;
- border-color: white;
- border-width: 1px;
- border-style: solid;
- background-color: #34a1ff;
- color: black;
- padding:5px;
-
-}
-
-.my_account_header {
- background-color:#000000;
- color:#FFFFFF;
- font-weight:bold;
- padding:5px;
-}
-
-#address_container {
- float:right;
- width:300px;
- margin: 5px;
-}
-
-.my_address {
- height: 120px;
- margin: 15px;
- padding: 5px;
- border: 1px solid #c0c0c0;
-}
-
-
-
-
-
-/* Payment Page */
-.gc_payment_form {
- display:none;
-
- -moz-border-radius:5px 5px 5px 5px;
- border:1px solid;
- margin:15px;
- padding:10px;
-}
-
-/* address manager */
-
-#address_mgr_title {
- font-weight: bold;
- margin-bottom: 10px;
-}
-
-#address_mgr_header {
- width: 775px;
- background-color: black;
- color: white;
- font-weight: bold;
- padding: 5px;
-}
-
-#address_mgr_container {
- padding: 5px;
- width: 773px;
- height:300px;
- border-right: 1px solid gray;
- border-left: 1px solid gray;
- border-bottom: 1px solid gray;
- position: relative;
-}
-
-#address_list_container{
- float: left;
- width: 450px;
- height: 300px;
- overflow:auto;
-
-
-}
-
-.required {
- border-left: 1px solid red;
-}
-
-.require_fail {
- border: 1px solid red;
-}
-
-.address_entry {
- width:95%;
- padding: 5px;
- margin: 1px;
- border: 1px solid #8d8d8d;
-}
-
-.odd {
- background-color: #cfcfcf;
-}
-
-.even {
- background-color: white;
-}
-
-#address_form_placeholder {
- clear:both;
- position:absolute;
- right:5px;
- top:10px;
- width:300px;
-}
-
-#address_bullets {
- margin:10px;
-}
-
-#address_mgr_form_container {
- clear:both;
- position:absolute;
- right:5px;
- top:10px;
- width:300px;
-
-
-}
\ No newline at end of file
diff --git a/css/styles.css b/css/styles.css
deleted file mode 100644
index a5098c1d..00000000
--- a/css/styles.css
+++ /dev/null
@@ -1,1222 +0,0 @@
-/**************************************************************
-Version: 1.0
-Template: Default
-Author: Noah Mormino
-Company: Clear Sky Designs
-Notes: Default template for Gocart 1.0
-**************************************************************/
-
-/* get some basics out the way */
-html{overflow-y:scroll}
-* {outline:none}
-img{border:0px}
-form{margin:0px;padding:0px}
-p {margin:0px 0px 10px 0px}
-iframe {border:0px}
-
-/* base tables */
-th {
- padding:5px;
- background:#ccc;
- font-size:14px;
- color:#525252;
-}
-
-/* base link styles */
-a, a:visited {color:#0c96e5;text-decoration:underline}
-a:hover {color:#046094}
-
-/*basic classes*/
-.left{ float:left}
-.right{float:right}
-.center{margin:auto; text-align:center}
-.clear{clear:both}
-.bold {font-weight:bold}
-.none {display:none}
-.red {color:#ff0000}
-
-/* structural wrappers */
-body {
- margin:0px;
- padding:0px;
- font-family: Arial, Verdana, sans-serif;
- font-size:12px;
- color:#333333;
- background-image:url('../images/body_bg.gif');
-}
-
-.full_wrap {
- width:100%;
- clear:both;
-}
-
-.wide_wrap {
- width:980px;
- margin:auto;
- position:relative;
-}
-
-.content_wrap {
- width:950px;
- padding:5px;
- margin:auto;
- border:5px solid #ddd;
- border-top:0px;
- background-color:#fff;
-}
-
-/* Javascript in the header automatically styles our type="text" for us */
-.input, textarea {
- -webkit-border-radius: 4px;
- -moz-border-radius: 4px;
- border-radius: 4px;
- border-top:1px solid #6d6d6d;
- border-left:1px solid #6d6d6d;
- border-right:1px solid #d5d5d5;
- border-bottom:1px solid #d5d5d5;
- padding:4px;
- font-size:12px;
- background-image:url('../images/input_bg.png');
- color:#555;
- font-family: Arial, Verdana, Sans-Serif;
-}
-
-.disabled {
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
- filter: alpha(opacity=60);
- -moz-opacity: 0.6;
- -khtml-opacity: 0.6;
- opacity: 0.6;
-}
-
-#header {
- padding:15px 0px;
-}
-
-/* Search form */
-#search_form {
- float:right;
- margin-top:5px;
- background-color:#fff;
- padding:5px 7px;
- border:1px solid #ddd;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
-}
-
-#search_form input {
- width:150px;
- font-size:14px;
-}
-
-#search_form button {
- font-size:12px;
-}
-
-
-/* Menus */
-#top_menu_container {
- background-color:#ddd;
- border-bottom:1px solid #c7c7c7;
-}
-
-#top_menu {
- float:right;
- margin:0px;
- padding:0px;
- font-size:12px;
-}
-
-#top_menu li {
- float:left;
- list-style-type:none;
- position:relative;
- cursor:pointer;
-}
-
-#top_menu li ul.first {
- position:absolute;
- top:2.1em;
- white-space:nowrap;
- left:0px;
- background-color:#ddd;
- padding:0px;
- margin:0px;
- text-align:left;
- z-index:9999;
- border-bottom:1px solid #c7c7c7;
-}
-
-#top_menu li ul.nav {
- position:absolute;
- top:0px;
- left:100%;
- margin-left:-1px;
- text-align:left;
- padding:0px;
- background-color:#ddd;
- z-index:9999;
- border-bottom:1px solid #c7c7c7;
-}
-
-#top_menu li a {
- padding:6px 15px;
- color:#585858;
- border:0px;
- display:block;
- text-decoration:none;
- text-shadow: rgba(255,255,255,.4) 0 1px 0;
-}
-
-#top_menu li ul li a {
- border:1px solid #c7c7c7;
- border-top:0px;
- border-bottom:0px;
-}
-
-#top_menu li:hover {
- background-color:#f2f2f2;
-}
-
-#top_menu li a:hover {
- color:#000;
- text-shadow:none;
-}
-
-#top_menu .nav li {
- display:block;
- clear:both;
- position:relative;
- width:200px;
-}
-
-#top_menu .first li{
- float:left;
- clear:left;
- width:100%;
-}
-
-#top_menu .first li {
- display:block;
- position:relative;
-}
-
-/* Main category menu*/
-#main_menu {
- background-color:#555;
- margin:0px;
- padding:0px;
-}
-
-.main_menu_left_wrap {
- position:absolute;
- left:0px;
- top:100%;
-}
-
-.main_menu_right_wrap {
- position:absolute;
- right:0px;
- top:100%;
-}
-
-#nav {
- float:left;
- margin:0px;
- padding:6px;
- font-size:12px;
- text-transform:uppercase;
-}
-
-#nav li {
- float:left;
- list-style-type:none;
- position:relative;
- cursor:pointer;
-}
-
-#nav li ul.nav {
- position:absolute;
- top:-10px;
- left:100%;
- text-align:left;
- padding:10px 10px 10px 0px;
- background-color:#555;
- z-index:9999;
-}
-
-#nav li ul.first {
- position:absolute;
- top:2.0em;
- white-space:nowrap;
- left:5px;
- background-color:#555;
- padding:10px 10px 10px 0px;
- margin:0px;
- text-align:left;
- z-index:9999;
-}
-
-#nav li a{
- padding:5px 10px;
- margin-left:10px;
- color:#f2f2f2;
- display:block;
- text-decoration:none;
- text-shadow: rgba(0,0,0,.4) 0 1px 0;
- border:0px;
-}
-
-#nav li a:hover {
- color:#333;
- background-color:#f2f2f2;
- text-shadow: rgb(255,255,255) 0 1px 0;
-}
-
-#nav .nav li {
- display:block;
- clear:both;
- position:relative;
- width:200px;
-}
-
-#nav .first li{
- float:left;
- clear:left;
- width:100%;
-}
-
-#nav .first li {
- display:block;
- position:relative;
-}
-
-ul.first {
- display:none;
-}
-
-ul.nav {
- display:none;
-
-}
-
-li:hover > .nav { display:block;}
-li:hover > .first { display:block;}
-
-h1 {
- font-size:22px;
- font-weight:normal;
- margin:7px 5px;
- font-family:'Lucida Grand', Arial, Verdana, Sans-Serif;
-}
-
-h2 {
- font-size:19px;
- font-weight:normal;
- margin:7px 5px;
- font-family:'Lucida Grand', Arial, Verdana, Sans-Serif;
-}
-
-.error {
- color:#c94f4f;
- padding:5px 12px;
- background-color:#f5dcdc;
- border:1px solid #d5a9a9;
- margin-bottom:10px;
- -webkit-border-radius: 15px;
- -moz-border-radius: 15px;
- border-radius: 15px;
-}
-
-.message {
- color:#aaa;
- padding:5px 12px;
- background-color:#f2f2f2;
- border:1px solid #cccccc;
- margin-bottom:10px;
- -webkit-border-radius: 15px;
- -moz-border-radius: 15px;
- border-radius: 15px;
-}
-/* Homepage Banners */
-#banners {
- width:950px;
- height:250px;
- margin:auto;
- position:relative;
-}
-
-.banner_container {
- position:absolute;
- top:0px;
- left:0px;
-}
-
-.banner_container img {
- width:950px;
- height:250px;
-}
-
-#homepage_boxes {
- margin:5px -5px -5px -5px;
-}
-
-.box_container{
- height:230px;
- width:230px;
- margin:5px;
- float:left;
-}
-
-.category_description {
- color:#555;
- padding:10px 5px;
-}
-
-.category_container {
- overflow:hidden;
- clear:both;
-}
-
-.category_box
-{
- width:136px;
- padding:5px;
- border:1px dotted #ccc;
- float:left;
- margin:5px;
- display:inline;
- text-align:center;
-}
-.category_box .thumbnail
-{
- height:75px;
-}
-.category_box .thumbnail, .category_box .thumbnail img {
- max-width:75px;
- max-height:75px;
- margin:auto;
-}
-
-.product_box
-{
- width:215px;
- padding:10px 5px;
- border:1px dotted #ccc;
- float:left;
- margin:5px;
- display:inline;
- text-align:center;
-}
-
-.product_box .thumbnail
-{
- height:150px;
-}
-.product_box .thumbnail, .product_box .thumbnail img {
- max-width:150px;
- max-height:150px;
- margin:auto;
-}
-
-.excerpt {
- margin-top:5px;
-}
-
-.pagination {
- text-align:center;
-}
-
-
-
-/* Homepage Content */
-#homepage_content
-{
- width:970px;
- margin:auto;
- padding-top:15px;
-}
-
-/* Login paage */
-#login_container_wrap
-{
- float: left;
- position: relative;
- left: 50%;
-}
-#login_container {
- float: left;
- position: relative;
- left: -50%;
- padding:10px;
- border:1px dotted #ccc;
- margin:10px auto;
-}
-
-#login_container td {
- padding-right:10px;
- padding-bottom:5px;
-}
-
-#login_form_links {
- padding-top:10px;
- text-align:center;
- font-size:11px;
-}
-
-
-/* Profile page (some shared elements) */
-.form_wrap {
- clear:both;
- position:relative;
-}
-
-.form_wrap div {
- float:left;
- font-weight:bold;
- padding:10px;
-}
-
-#my_information {
- width:360px;
-}
-
-#my_information h2 {
- margin:0px;
- padding:0px;
- margin-bottom:10px;
-}
-
-#address_manager {
- float:right;
- width:550px;
- padding:7px;
-}
-
-#address_manager h2{
- margin:3px 0px;
-}
-
-.my_account_address
-{
- padding:10px;
- background-color:#f2f2f2;
- -webkit-border-radius: 7px;
- -moz-border-radius: 7px;
- border-radius: 7px;
- margin-bottom:10px;
- border:1px solid #f2f2f2;
-}
-
-.my_account_address:hover {
- background-color:#eee;
- border:1px solid #ddd;
-}
-
-.address_toolbar {
- font-size:10px;
- float:right;
-}
-
-/* View cart page, with shared elements */
-
-.cart_table {
- width:100%;
-}
-
-.cart_table thead tr th {
- background-color:#ccc;
- color:#333;
- font-size:12px;
- text-align:left;
- padding:5px 10px;
-}
-
-.cart_table thead tr th:first-child, .cart_item td:first-child {
- -webkit-border-top-left-radius: 5px;
- -webkit-border-bottom-left-radius: 5px;
- -moz-border-radius-topleft: 5px;
- -moz-border-radius-bottomleft: 5px;
- border-top-left-radius: 5px;
- border-bottom-left-radius: 5px;
-}
-
-.cart_table thead tr th:last-child, .cart_item td:last-child {
- -webkit-border-top-right-radius: 5px;
- -webkit-border-bottom-right-radius: 5px;
- -moz-border-radius-topright: 5px;
- -moz-border-radius-bottomright: 5px;
- border-top-right-radius: 5px;
- border-bottom-right-radius: 5px;
-}
-
-.cart_spacer td {
- height:5px;
- overflow:hidden;
-}
-
-.cart_item td {
- background-color:#f2f2f2;
- color:#555;
- padding:5px 10px;
-}
-
-.cart_table tfoot tr td {
- background-color:#ccc;
- padding:5px 10px;
- color:#333;
- font-size:12px;
- font-weight:bold;
-}
-
-.cart_table tfoot tr.cart_total td {
- background-color:#555;
- color:#f2f2f2;
- padding-top:10px;
- font-size:14px;
-}
-
-.tfoot_top td {
- -webkit-border-top-left-radius: 5px;
- -webkit-border-top-right-radius: 5px;
- -moz-border-radius-topleft: 5px;
- -moz-border-radius-topright: 5px;
- border-top-left-radius: 5px;
- border-top-right-radius: 5px;
- height:0px;
- padding:5px 0px 0px 0px;
-}
-
-.cart_table tfoot tr.tfoot_bottom td {
- -webkit-border-bottom-right-radius: 5px;
- -webkit-border-bottom-left-radius: 5px;
- -moz-border-radius-bottomright: 5px;
- -moz-border-radius-bottomleft: 5px;
- border-bottom-right-radius: 5px;
- border-bottom-left-radius: 5px;
- height:0px;
- padding:0px 0px 5px 0px;
- background-color:#555;
-}
-
-/* View Cart Page */
-.view_cart_additions {
- margin-top:10px;
- border:1px dashed #ccc;
- background-color:#f2f2f2;
- text-align:center;
- padding:20px;
- float:left;
- -webkit-border-radius: 7px;
- -moz-border-radius: 7px;
- border-radius: 7px;
-}
-
-#gc_view_cart_buttons {
- float:right;
- clear:none;
- margin-top:10px;
-}
-
-/* Checkout */
-.continue_shopping {
- float:right;
- margin-top:-35px;
- text-align:right;
-}
-
-.form_wrap div.shorter input{
- width:100px;
-}
-
-.form_wrap div.longer input{
- width:300px;
-}
-
-#shipping_address{
- float:left;
- width:47.5%;
-}
-
-#billing_address{
- float:right;
- width:50%;
-}
-
-.checkout_block {
- background-color:#f2f2f2;
- padding:8px;
- margin-bottom:20px;
- height:auto;
- -webkit-border-radius: 7px;
- -moz-border-radius: 7px;
- border-radius: 7px;
- position:relative;
-}
-
-.checkout_textarea
-{
- display:block;
- height:50px;
- resize:none;
-}
-
-/* Place Order Page */
-.customer_info_box {
- margin:10px 10px 10px 0px;
- border:1px dashed #ccc;
- background-color:#f2f2f2;
- padding:10px;
- float:left;
- -webkit-border-radius: 7px;
- -moz-border-radius: 7px;
- border-radius: 7px;
-}
-
-.customer_info_box h3 {
- font-weight:normal;
- color:#777777;
- font-size:16px;
- margin:0px 0px 10px 0px;
- padding:0px;
-}
-
-#gc_breadcrumb {
- font-size:10px;
- font-family: Verdana, Arial, sans-serif;
- border-bottom:1px solid #ccc;
- margin-bottom:10px;
- padding-bottom:5px;
- font-weight:bold;
-}
-
-#gc_breadcrumb a {
- font-weight:normal;
-}
-
-/* Category Page */
-.gc_product_list {
- width:100%;
-}
-
-.gc_product_row {
- text-align:left;
- width:100%;
-}
-
-
-.product_name {
- font-weight:bold;
- font-size:14px;
-}
-
-.product_sku {
- font-size:11px;
- font-family:verdana, arial, sans-serif;
- height:20px;
-}
-
-.price_container {
- padding:5px 0px;
-}
-
-.price_slash {
- text-decoration:line-through;
- font-size:12px;
-}
-
-.price_sale {
- font-weight:bold;
- color:#ff0000;
- font-size:14px;
-}
-
-.price_reg {
- font-weight:bold;
- font-size:14px;
-}
-
-.out_of_stock {
- color:#FF0000;
-}
-
-
-
-/* Product Page */
-.add_to_cart_btn {
- padding:10px;
- font-size:20px;
-}
-
-.product_quantity {
- width:50px;
-}
-
-#product_caption {
- background-color:#ccc;
- margin:0px -5px -5px -5px;
- padding:5px;
- text-align:center;
- color:#555;
-}
-
-#product_left {
- width:247px;
- float:left;
-}
-
-#product_right {
- width:690px;
- float:right;
- overflow:hidden;
-
-}
-
-#product_image {
- padding:5px;
- border:1px solid #ccc;
- width:235px;
-}
-
-#product_image a img {
- margin:auto;
-}
-
-#product_thumbnails
-{
- padding-top:15px;
- width:245px;
-}
-
-.product_thumbnail
-{
- width:75px;
- margin:10px 10px 10px 0px;
- float:left;
-}
-
-.product_thumbnail a img
-{
- width:75px;
-}
-
-#product_price {
- float:right;
-}
-
-.product_section {
- padding:10px;
- border-top:1px solid #ddd;
-}
-
-.option_container {
- margin-bottom:15px;
-}
-
-.option_name {
- font-weight:bold;
- font-size:12px;
-}
-
-#social_sharing {
- float:right;
- margin-top:-30px;
- width:150px;
- text-align:right;
-}
-
-.tabs {
- margin-top:10px;
- overflow:hidden;
- width:680px;
-}
-
-#product_form {
- float:right;
-}
-
-#gc_product_form {
- margin-top:10px;
- width:100%;
-}
-
-
-
-.gc_option {
- padding-bottom:10px;
-}
-
-#gc_options_note {
- text-align:center;
- font-weight:bold;
- font-size:11px;
- font-family:verdana, arial, sans-serif;
- color:#a70000;
-}
-
-
-/* Customer Details */
-.gc_customer_details, .gc_customer_details table{
- width:100%;
-}
-.gc_customer_details td {
- vertical-align:top;
- padding-right:10px;
-}
-#gc_copy_billing {
- margin:auto;
- display:block;
-}
-
-#logged_in_address_container{
- width:100%;
- overflow: auto;
- margin-bottom: 15px;
-}
-
-#checkout_billing_address {
- padding: 5px;
- border:1px solid #C0C0C0;
- float:left;
- width:225px;
- height: 125px;
-}
-
-#bill_address_display, #ship_address_display {
- padding: 5px;
-}
-
-#checkout_shipping_address {
- padding: 5px;
- border:1px solid #C0C0C0;
- margin-left:250px;
- width:225px;
- height:125px;
-}
-
-/* scheckout */
-#payment_section_container table tr td {
- vertical-align:top;
-}
-
-#shipping_section {
- float:left;
- width:400px;
-}
-
-
-
-.checkout_block h2 {
- font-weight:normal;
- margin:0px 0px 10px 0px;
- padding:0px;
- font-size:19px;
-}
-
-.checkout_block h3 {
- font-weight:normal;
- color:#777777;
- font-size:16px;
- margin:0px 0px 10px 0px;
- padding:0px;
-}
-
-#tab_detail {
- font-size:13px;
- font-family:arial, verdana, sans-serif;
-}
-
-#static_address_content {
- position: relative;
- margin-bottom: 10px;
- height: 150px
-}
-
-#static_bill_address {
- padding: 5px;
- border:1px solid #C0C0C0;
- float:left;
- width:225px;
-}
-
-#static_ship_address {
- padding: 5px;
- border:1px solid #C0C0C0;
- margin-left:250px;
- width:225px;
- height:125px;
-}
-
-
-
-/* Customer Details */
-
-.disabled {
- border 1px solid #AAAAAA;
- background-color: #CCCCCC;
-}
-.register_field {
- text-align:right;
-}
-#gc_customer_details, #gc_customer_details table{
- width:100%;
-}
-#gc_customer_details td {
- vertical-align:top;
- padding-right:10px;
-}
-#gc_copy_billing {
- float:right;
-}
-
-.gc_reg_input {
- width:550px;
-}
-
-/* Confirmation page*/
-.confirm_customer
-{
- font-size:12px;
- padding:10px;
- margin-bottom:10px;
- border:1px solid #b2d799;
- background-color:#ffffff;
-}
-.confirm_customer table tr td {
- vertical-align:top;
-}
-.company_name {
- font-size:16px;
- font-weight:bold;
- padding:0px 0px 3px 0px;
- text-transform:uppercase;
-}
-
-.order_number {
- font-size:20px;
- font-weight:bold;
- padding:0px 0px 3px 0px;
- text-transform:uppercase;
-}
-
-
-
-
-/* My Account Page */
-.delete_address {
- cursor:pointer;
-}
-
-#my_information {
- background-color:#f2f2f2;
- -webkit-border-radius: 7px;
- -moz-border-radius: 7px;
- border-radius: 7px;
- padding:10px;
- float:left;
-}
-#my_account_info h2 {
- font-weight:normal;
- margin-bottom:10px;
- font-size:19px;
-}
-#my_account_container {
- overflow: auto;
-}
-
-#customer_details {
-
- float:left;
- margin:5px;
- width:360px;
-}
-
-#customer_details_form {
-
-}
-
-#confirmation_box {
- margin-bottom: 10px;
- border-color: white;
- border-width: 1px;
- border-style: solid;
- background-color: #34a1ff;
- color: black;
- padding:5px;
-
-}
-
-.my_account_header {
- background-color:#000000;
- color:#FFFFFF;
- font-weight:bold;
- padding:5px;
-}
-
-#address_container {
- float:right;
- width:300px;
- margin: 5px;
-}
-
-.my_address {
- height: 120px;
- margin: 15px;
- padding: 5px;
- border: 1px solid #c0c0c0;
-}
-
-
-
-
-
-/* Payment Page */
-.gc_payment_form {
- display:none;
-}
-
-/* address manager */
-
-#address_mgr_title {
- font-weight: bold;
- margin-bottom: 10px;
-}
-
-#address_mgr_header {
- width: 775px;
- background-color: black;
- color: white;
- font-weight: bold;
- padding: 5px;
-}
-
-#address_mgr_container {
- padding: 5px;
- width: 773px;
- height:300px;
- border-right: 1px solid gray;
- border-left: 1px solid gray;
- border-bottom: 1px solid gray;
- position: relative;
-}
-
-#address_list_container{
- float: left;
- width: 450px;
- height: 300px;
- overflow:auto;
-
-
-}
-
-.required {
- border-left: 1px solid red;
-}
-
-.require_fail {
- border: 1px solid red;
-}
-
-.address_entry {
- width:95%;
- padding: 5px;
- margin: 1px;
- border: 1px solid #8d8d8d;
-}
-
-.odd {
- background-color: #cfcfcf;
-}
-
-.even {
- background-color: white;
-}
-
-#address_form_placeholder {
- clear:both;
- position:absolute;
- right:5px;
- top:10px;
- width:300px;
-}
-
-#address_bullets {
- margin:10px;
-}
-
-#address_mgr_form_container {
- clear:both;
- position:absolute;
- right:5px;
- top:10px;
- width:300px;
-}
-
-/* customize stuff */
-#left_content {
- width: 635px;
- float: left;
-}
-
-#right_content {
- width:335px;
- float:right;
-}
-
-#file_upload_status
-{
- width:0%;
- overflow:visible;
- text-align:center;
- padding-top:7px;
- background-color:#000099;
- -webkit-border-radius: 5px;
- -moz-border-radius: 5px;
- border-radius: 5px;
- border:1px solid #910000;
- background-image:url('..../images/status_bg.gif');
- background-repeat:repeat-x;
- height:28px;
- overflow:hidden;
- margin:5px 0px;
- -moz-box-shadow: 1px 2px 2px rgba(0,0,0,.3);
- -webkit-box-shadow: 1px 2px 2px rgba(0,0,0,.3);
- box-shadow: 1px 2px 2px rgba(0,0,0,.3);
-}
-
-#hide_upload_status {
- display:none;
-}
-
-#footer_lid {
- width:970px;
- height:8px;
- background-image:url("../images/footer_lid.gif");
- overflow:hidden;
- margin:auto;
-}
-.footer {
- position:relative;
- width:960px;
- padding:5px;
- margin:auto;
- min-height:150px;
- background-image:url('../images/footer_bg.png');
- background-repeat:no-repeat;
- background-color:#ddd;
-}
-
-#footer_social {
- position:absolute;
- top:115px;
- left:5px;
- width:250px;
-}
-
-#footer_props {
- text-align:center;
- color:#555;
- font-size:10px;
- margin-top:130px;
-}
\ No newline at end of file
diff --git a/gocart/GoCart license.txt b/gocart/GoCart license.txt
deleted file mode 100644
index 297cd361..00000000
--- a/gocart/GoCart license.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-Copyright (c) 2008 - 2011, Clear Sky Designs, LLC
-All rights reserved.
-
-This license is a legal agreement between you and EllisLab Inc. for the use
-of GoCart Software (the "Software"). By obtaining the Software you
-agree to comply with the terms and conditions of this license.
-
-PERMITTED USE
-You are permitted to use, copy, modify, and distribute the Software and its
-documentation, with or without modification, for any purpose, provided that
-the following conditions are met:
-
-1. A copy of this license agreement must be included with the distribution.
-
-2. Redistributions of source code must retain the above copyright notice in
- all source code files.
-
-3. Redistributions in binary form must reproduce the above copyright notice
- in the documentation and/or other materials provided with the distribution.
-
-4. Any files that have been modified must carry notices stating the nature
- of the change and the names of those who changed them.
-
-5. Products derived from the Software must include an acknowledgment that
- they are derived from GoCart in their documentation and/or other
- materials provided with the distribution.
-
-6. Products derived from the Software may not be called "GoCart",
- nor may "GoCart" appear in their name, without prior written
- permission from Clear Sky Designs, LLC
-
-INDEMNITY
-You agree to indemnify and hold harmless the authors of the Software and
-any contributors for any direct, indirect, incidental, or consequential
-third-party claims, actions or suits, as well as any related expenses,
-liabilities, damages, settlements or fees arising from your use or misuse
-of the Software, or a violation of any terms of this license.
-
-DISCLAIMER OF WARRANTY
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR
-IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF QUALITY, PERFORMANCE,
-NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
-
-LIMITATIONS OF LIABILITY
-YOU ASSUME ALL RISK ASSOCIATED WITH THE INSTALLATION AND USE OF THE SOFTWARE.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS OF THE SOFTWARE BE LIABLE
-FOR CLAIMS, DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION
-WITH THE SOFTWARE. LICENSE HOLDERS ARE SOLELY RESPONSIBLE FOR DETERMINING THE
-APPROPRIATENESS OF USE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE, INCLUDING
-BUT NOT LIMITED TO THE RISKS OF PROGRAM ERRORS, DAMAGE TO EQUIPMENT, LOSS OF
-DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS.
diff --git a/gocart/config/autoload.php b/gocart/config/autoload.php
index fa4aed38..7ccf7292 100644
--- a/gocart/config/autoload.php
+++ b/gocart/config/autoload.php
@@ -52,7 +52,7 @@
| $autoload['libraries'] = array('database', 'session', 'xmlrpc');
*/
-$autoload['libraries'] = array('database', 'session', 'auth');
+$autoload['libraries'] = array('database', 'session', 'auth', 'go_cart');
/*
@@ -64,7 +64,7 @@
| $autoload['helper'] = array('url', 'file');
*/
-$autoload['helper'] = array('url', 'file', 'string', 'utility', 'html');
+$autoload['helper'] = array('url', 'file', 'string', 'html', 'language');
/*
@@ -96,7 +96,7 @@
|
*/
-$autoload['language'] = array();
+$autoload['language'] = array('common');
/*
@@ -109,7 +109,7 @@
|
*/
-$autoload['model'] = array('Customer_model', 'Category_model', 'Cart_model', 'Settings_model');
+$autoload['model'] = array('Customer_model', 'Category_model', 'Settings_model', 'Location_model');
/* End of file autoload.php */
diff --git a/gocart/config/config.php b/gocart/config/config.php
index 0b255eca..64611376 100644
--- a/gocart/config/config.php
+++ b/gocart/config/config.php
@@ -27,7 +27,7 @@
| variable so that it is blank.
|
*/
-$config['index_page'] = 'index.php';
+$config['index_page'] = '';
/*
|--------------------------------------------------------------------------
@@ -225,7 +225,7 @@
| MUST set an encryption key. See the user guide for info.
|
*/
-$config['encryption_key'] = 'a3bed46e139353c4d4c091d7de9eb6c9';
+$config['encryption_key'] = 'default encryption key';
/*
|--------------------------------------------------------------------------
diff --git a/gocart/config/migration.php b/gocart/config/migration.php
new file mode 100644
index 00000000..f2c977ec
--- /dev/null
+++ b/gocart/config/migration.php
@@ -0,0 +1,41 @@
+migration->latest() this is the version that schema will
+| be upgraded / downgraded to.
+|
+*/
+$config['migration_version'] = 1;
+
+
+/*
+|--------------------------------------------------------------------------
+| Migrations Path
+|--------------------------------------------------------------------------
+|
+| Path to your migrations folder.
+| Typically, it will be within your application path.
+| Also, writing permission is required within the migrations path.
+|
+*/
+$config['migration_path'] = APPPATH . 'migrations/';
+
+
+/* End of file migration.php */
+/* Location: ./application/config/migration.php */
\ No newline at end of file
diff --git a/gocart/config/routes.php b/gocart/config/routes.php
index f7797dfd..f80da152 100644
--- a/gocart/config/routes.php
+++ b/gocart/config/routes.php
@@ -42,37 +42,4 @@
//this for the admininstration console
$route['admin'] = 'admin/dashboard';
-
-//get routes from database
-include('database.php');
-
-if($db[$active_group]['pconnect'])
-{
- mysql_pconnect($db[$active_group]['hostname'],$db[$active_group]['username'],$db[$active_group]['password']);
-}
-else
-{
- mysql_connect($db[$active_group]['hostname'],$db[$active_group]['username'],$db[$active_group]['password']);
-}
-mysql_select_db($db[$active_group]['database']) or die("Unable to select database");
-
-$routes = mysql_query('SELECT * FROM '.$db[$active_group]['dbprefix'].'routes');
-
-while($row = mysql_fetch_array($routes))
-{
- //if "category" is in the route, then add some stuff for pagination
- if(strpos($row['route'], 'category'))
- {
- $route[$row['slug']] = $row['route'];
-
- $row['slug'] .= '/(:num)';
- $row['route'] .= '/$1';
- }
- $route[$row['slug']] = $row['route'];
-}
-
-mysql_free_result($routes);
-
-
-//in case we're using pconnect
-mysql_close();
+$route['admin/media/(:any)'] = 'admin/media/$1';
diff --git a/gocart/controllers/admin/admin.php b/gocart/controllers/admin/admin.php
old mode 100755
new mode 100644
index 20e4cda1..e95512c3
--- a/gocart/controllers/admin/admin.php
+++ b/gocart/controllers/admin/admin.php
@@ -1,5 +1,5 @@
load->library('Auth');
-
- $this->auth->is_logged_in(uri_string());
$this->auth->check_access('Admin', true);
+ //load the admin language file in
+ $this->lang->load('admin');
+
$this->current_admin = $this->session->userdata('admin');
}
function index()
{
- $data['page_title'] = 'Admins';
+ $data['page_title'] = lang('admins');
$data['admins'] = $this->auth->get_admin_list();
$this->load->view($this->config->item('admin_folder').'/admins', $data);
@@ -27,10 +27,13 @@ function delete($id)
//even though the link isn't displayed for an admin to delete themselves, if they try, this should stop them.
if ($this->current_admin['id'] == $id)
{
- $this->session->set_flashdata('message', 'You cannot delete yourself!');
+ $this->session->set_flashdata('message', lang('error_self_delete'));
redirect($this->config->item('admin_folder').'/admin');
}
- $this->session->set_flashdata('message', $this->auth->delete($id));
+
+ //delete the user
+ $this->auth->delete($id);
+ $this->session->set_flashdata('message', lang('message_user_deleted'));
redirect($this->config->item('admin_folder').'/admin');
}
function form($id = false)
@@ -41,7 +44,7 @@ function form($id = false)
$this->load->library('form_validation');
$this->form_validation->set_error_delimiters('
', '
');
- $data['page_title'] = 'Add Admin';
+ $data['page_title'] = lang('admin_form');
//default values are empty if the customer is new
$data['id'] = '';
@@ -57,31 +60,27 @@ function form($id = false)
//if the administrator does not exist, redirect them to the admin list with an error
if (!$admin)
{
- $this->session->set_flashdata('message', 'The requested admin could not be found.');
+ $this->session->set_flashdata('message', lang('admin_not_found'));
redirect($this->config->item('admin_folder').'/admin');
}
-
- //set title to edit if we have an ID
- $data['page_title'] = 'Edit Administrator';
-
//set values to db values
- $data['id'] = $admin->id;
+ $data['id'] = $admin->id;
$data['firstname'] = $admin->firstname;
$data['lastname'] = $admin->lastname;
$data['email'] = $admin->email;
$data['access'] = $admin->access;
}
- $this->form_validation->set_rules('firstname', 'First Name', 'trim|max_length[32]');
- $this->form_validation->set_rules('lastname', 'Last Name', 'trim|max_length[32]');
- $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email|max_length[128]|callback_check_email');
- $this->form_validation->set_rules('access', 'Access', 'trim|required');
+ $this->form_validation->set_rules('firstname', 'lang:firstname', 'trim|max_length[32]');
+ $this->form_validation->set_rules('lastname', 'lang:lastname', 'trim|max_length[32]');
+ $this->form_validation->set_rules('email', 'lang:email', 'trim|required|valid_email|max_length[128]|callback_check_email');
+ $this->form_validation->set_rules('access', 'lang:access', 'trim|required');
//if this is a new account require a password, or if they have entered either a password or a password confirmation
if ($this->input->post('password') != '' || $this->input->post('confirm') != '' || !$id)
{
- $this->form_validation->set_rules('password', 'Password', 'required|min_length[6]|sha1');
- $this->form_validation->set_rules('confirm', 'Confirm Password', 'required|matches[password]');
+ $this->form_validation->set_rules('password', 'lang:password', 'required|min_length[6]|sha1');
+ $this->form_validation->set_rules('confirm', 'lang:confirm_password', 'required|matches[password]');
}
if ($this->form_validation->run() == FALSE)
@@ -103,14 +102,7 @@ function form($id = false)
$this->auth->save($save);
- if (!$id)
- {
- $this->session->set_flashdata('message', 'The user has been added');
- }
- else
- {
- $this->session->set_flashdata('message', ' The user has been updated.');
- }
+ $this->session->set_flashdata('message', lang('message_user_saved'));
//go back to the customer list
redirect($this->config->item('admin_folder').'/admin');
@@ -119,10 +111,10 @@ function form($id = false)
function check_email($str)
{
- $email = $this->auth->check_email($str, $this->admin_id);
- if ($email)
- {
- $this->form_validation->set_message('check_email', 'The Email is already in use.');
+ $email = $this->auth->check_email($str, $this->admin_id);
+ if ($email)
+ {
+ $this->form_validation->set_message('check_email', lang('error_email_taken'));
return FALSE;
}
else
diff --git a/gocart/controllers/admin/banners.php b/gocart/controllers/admin/banners.php
index 01ed7ac2..390840b1 100644
--- a/gocart/controllers/admin/banners.php
+++ b/gocart/controllers/admin/banners.php
@@ -1,17 +1,15 @@
load->library('auth');
-
- $this->auth->is_logged_in(uri_string());
$this->auth->check_access('Admin', true);
+ $this->lang->load('banner');
+
$this->load->model('Banner_model');
$this->load->helper('date');
@@ -20,7 +18,7 @@ function __construct()
function index()
{
$data['banners'] = $this->Banner_model->get_banners();
- $data['page_title'] = 'Banners';
+ $data['page_title'] = lang('banners');
$this->load->view($this->config->item('admin_folder').'/banners', $data);
}
@@ -33,7 +31,9 @@ function organize()
function delete($id)
{
- $this->session->set_flashdata('message', $this->Banner_model->delete($id));
+ $this->Banner_model->delete($id);
+
+ $this->session->set_flashdata('message', lang('message_delete_banner'));
redirect($this->config->item('admin_folder').'/banners');
}
@@ -47,8 +47,6 @@ function form($id = false)
$config['upload_path'] = 'uploads';
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = $this->config->item('size_limit');
- $config['max_width'] = '1024';
- $config['max_height'] = '768';
$config['encrypt_name'] = true;
$this->load->library('upload', $config);
@@ -66,20 +64,22 @@ function form($id = false)
,'new_window'=>false
);
- $data['page_title'] = 'New Ad';
if($id)
{
$data = (array) $this->Banner_model->get_banner($id);
+ $data['enable_on'] = format_mdy($data['enable_on']);
+ $data['disable_on'] = format_mdy($data['disable_on']);
$data['new_window'] = (bool) $data['new_window'];
- $data['page_title'] = 'Edit Ad';
}
- $this->form_validation->set_rules('title', 'Title', 'trim|required|full_decode');
- $this->form_validation->set_rules('enable_on', 'Enable On', 'trim');
- $this->form_validation->set_rules('disable_on', 'Disable On', 'trim|callback_date_check');
- $this->form_validation->set_rules('image', 'image', 'trim');
- $this->form_validation->set_rules('link', 'Link', 'trim');
- $this->form_validation->set_rules('new_window', 'New Window', 'trim');
+ $data['page_title'] = lang('banner_form');
+
+ $this->form_validation->set_rules('title', 'lang:title', 'trim|required|full_decode');
+ $this->form_validation->set_rules('enable_on', 'lang:enable_on', 'trim');
+ $this->form_validation->set_rules('disable_on', 'lang:disable_on', 'trim|callback_date_check');
+ $this->form_validation->set_rules('image', 'lang:image', 'trim');
+ $this->form_validation->set_rules('link', 'lang:link', 'trim');
+ $this->form_validation->set_rules('new_window', 'lang:new_window', 'trim');
if ($this->form_validation->run() == false)
{
@@ -92,11 +92,11 @@ function form($id = false)
$uploaded = $this->upload->do_upload('image');
$save['title'] = $this->input->post('title');
- $save['enable_on'] = $this->input->post('enable_on');
- $save['disable_on'] = $this->input->post('disable_on');
+ $save['enable_on'] = format_ymd($this->input->post('enable_on'));
+ $save['disable_on'] = format_ymd($this->input->post('disable_on'));
$save['link'] = $this->input->post('link');
$save['new_window'] = $this->input->post('new_window');
-
+
if ($id)
{
$save['id'] = $id;
@@ -134,22 +134,21 @@ function form($id = false)
}
$this->Banner_model->save_banner($save);
- $message = 'The "'.$this->input->post('title').'" banner has been saved.';
- $this->session->set_flashdata('message', $message);
+ $this->session->set_flashdata('message', lang('message_banner_saved'));
redirect($this->config->item('admin_folder').'/banners');
}
}
- function date_check($str)
+ function date_check()
{
- if ($this->input->post('enable_on') != '')
+ if ($this->input->post('disable_on') != '')
{
- if ($this->input->post('enable_on') >= $str)
+ if (format_ymd($this->input->post('disable_on')) <= format_ymd($this->input->post('enable_on')))
{
- $this->form_validation->set_message('date_check', 'The "Disable On" date cannot come on or before the "Enable On" date.');
+ $this->form_validation->set_message('date_check', lang('date_error'));
return FALSE;
}
}
diff --git a/gocart/controllers/admin/boxes.php b/gocart/controllers/admin/boxes.php
index 9abef06f..04e6d6a5 100644
--- a/gocart/controllers/admin/boxes.php
+++ b/gocart/controllers/admin/boxes.php
@@ -1,31 +1,30 @@
load->library('auth');
+
$this->auth->check_access('Admin', true);
-
+
+ $this->lang->load('boxes');
$this->load->model('Box_model');
$this->load->helper('date');
- $this->auth->is_logged_in(uri_string());
}
function index()
{
$data['boxes'] = $this->Box_model->get_boxes();
- $data['page_title'] = 'Boxes';
+ $data['page_title'] = lang('boxes');
$this->load->view($this->config->item('admin_folder').'/boxes', $data);
}
function delete($id)
{
- $this->session->set_flashdata('message', $this->Box_model->delete($id));
+ $this->Box_model->delete($id);
+ $this->session->set_flashdata('message', lang('message_delete_box'));
redirect($this->config->item('admin_folder').'/boxes');
}
@@ -62,22 +61,21 @@ function form($id = false)
,'link'=>''
,'new_window'=>false
);
-
- $data['page_title'] = 'New Ad';
if($id)
{
$data = (array) $this->Box_model->get_box($id);
-
+ $data['enable_on'] = format_mdy($data['enable_on']);
+ $data['disable_on'] = format_mdy($data['disable_on']);
$data['new_window'] = (bool) $data['new_window'];
- $data['page_title'] = 'Edit Ad';
}
+ $data['page_title'] = lang('box_form');
- $this->form_validation->set_rules('title', 'Title', 'trim|required|full_decode');
- $this->form_validation->set_rules('enable_on', 'Enable On', 'trim');
- $this->form_validation->set_rules('disable_on', 'Disable On', 'trim');
- $this->form_validation->set_rules('image', 'image', 'trim');
- $this->form_validation->set_rules('link', 'Link', 'trim');
- $this->form_validation->set_rules('new_window', 'New Window', 'trim');
+ $this->form_validation->set_rules('title', 'lang:title', 'trim|required|full_decode');
+ $this->form_validation->set_rules('enable_on', 'lang:enable_on', 'trim');
+ $this->form_validation->set_rules('disable_on', 'lang:disable_on', 'trim|callback_date_check');
+ $this->form_validation->set_rules('image', 'lang:image', 'trim');
+ $this->form_validation->set_rules('link', 'lang:link', 'trim');
+ $this->form_validation->set_rules('new_window', 'lang:new_window', 'trim');
if ($this->form_validation->run() == false)
{
@@ -90,8 +88,8 @@ function form($id = false)
$uploaded = $this->upload->do_upload('image');
$save['title'] = $this->input->post('title');
- $save['enable_on'] = $this->input->post('enable_on');
- $save['disable_on'] = $this->input->post('disable_on');
+ $save['enable_on'] = format_ymd($this->input->post('enable_on'));
+ $save['disable_on'] = format_ymd($this->input->post('disable_on'));
$save['link'] = $this->input->post('link');
$save['new_window'] = $this->input->post('new_window');
@@ -132,11 +130,25 @@ function form($id = false)
}
$this->Box_model->save($save);
- $message = 'The "'.$this->input->post('title').'" box has been saved.';
- $this->session->set_flashdata('message', $message);
+ $this->session->set_flashdata('message', lang('message_box_saved'));
redirect($this->config->item('admin_folder').'/boxes');
}
}
+
+ function date_check()
+ {
+
+ if ($this->input->post('disable_on') != '')
+ {
+ if (format_ymd($this->input->post('disable_on')) <= format_ymd($this->input->post('enable_on')))
+ {
+ $this->form_validation->set_message('date_check', lang('date_error'));
+ return FALSE;
+ }
+ }
+
+ return TRUE;
+ }
}
\ No newline at end of file
diff --git a/gocart/controllers/admin/categories.php b/gocart/controllers/admin/categories.php
index 48d5d626..e5cef0bd 100644
--- a/gocart/controllers/admin/categories.php
+++ b/gocart/controllers/admin/categories.php
@@ -1,19 +1,15 @@
load->library('Auth');
$this->auth->check_access('Admin', true);
-
+ $this->lang->load('category');
$this->load->model('Category_model');
- //this adds the redirect url to our flash data, incase they are not logged in
- $this->auth->is_logged_in(uri_string());
}
function index()
@@ -21,19 +17,44 @@ function index()
//we're going to use flash data and redirect() after form submissions to stop people from refreshing and duplicating submissions
//$this->session->set_flashdata('message', 'this is our message');
- $data['page_title'] = 'Categories';
+ $data['page_title'] = lang('categories');
$data['categories'] = $this->Category_model->get_categories_tierd();
$this->load->view($this->config->item('admin_folder').'/categories', $data);
}
+ //basic category search
+ function category_autocomplete()
+ {
+ $name = trim($this->input->post('name'));
+ $limit = $this->input->post('limit');
+
+ if(empty($name))
+ {
+ echo json_encode(array());
+ }
+ else
+ {
+ $results = $this->Category_model->category_autocomplete($name, $limit);
+
+ $return = array();
+ foreach($results as $r)
+ {
+ $return[$r->id] = $r->name;
+ }
+ echo json_encode($return);
+ }
+
+ }
+
function organize($id = false)
{
$this->load->helper('form');
+ $this->load->helper('formatting');
if (!$id)
{
- $this->session->set_flashdata('message', 'You must select a category to organize.');
+ $this->session->set_flashdata('error', lang('error_must_select'));
redirect($this->config->item('admin_folder').'/categories');
}
@@ -41,11 +62,11 @@ function organize($id = false)
//if the category does not exist, redirect them to the category list with an error
if (!$data['category'])
{
- $this->session->set_flashdata('message', 'The requested category could not be found.');
+ $this->session->set_flashdata('error', lang('error_not_found'));
redirect($this->config->item('admin_folder').'/categories');
}
- $data['page_title'] = 'Oranize "'.$data['category']->name.'" Category';
+ $data['page_title'] = sprintf(lang('organize_category'), $data['category']->name);
$data['category_products'] = $this->Category_model->get_category_products_admin($id);
@@ -76,7 +97,7 @@ function form($id = false)
$this->form_validation->set_error_delimiters('', '
');
$data['categories'] = $this->Category_model->get_categories();
- $data['page_title'] = 'Add Category';
+ $data['page_title'] = lang('category_form');
//default values are empty if the customer is new
$data['id'] = '';
@@ -89,6 +110,7 @@ function form($id = false)
$data['seo_title'] = '';
$data['meta'] = '';
$data['parent_id'] = 0;
+ $data['error'] = '';
//create the photos array for later use
$data['photos'] = array();
@@ -100,16 +122,13 @@ function form($id = false)
//if the category does not exist, redirect them to the category list with an error
if (!$category)
{
- $this->session->set_flashdata('message', 'The requested category could not be found.');
+ $this->session->set_flashdata('error', lang('error_not_found'));
redirect($this->config->item('admin_folder').'/categories');
}
//helps us with the slug generation
$this->category_name = $this->input->post('slug', $category->slug);
- //set title to edit if we have an ID
- $data['page_title'] = 'Edit Category';
-
//set values to db values
$data['id'] = $category->id;
$data['name'] = $category->name;
@@ -124,15 +143,15 @@ function form($id = false)
}
- $this->form_validation->set_rules('name', 'Name', 'trim|required|max_length[64]');
- $this->form_validation->set_rules('slug', 'slug', 'trim');
- $this->form_validation->set_rules('description', 'Description', 'trim');
- $this->form_validation->set_rules('excerpt', 'Excerpt', 'trim');
- $this->form_validation->set_rules('sequence', 'Sequence', 'trim|integer');
+ $this->form_validation->set_rules('name', 'lang:name', 'trim|required|max_length[64]');
+ $this->form_validation->set_rules('slug', 'lang:slug', 'trim');
+ $this->form_validation->set_rules('description', 'lang:description', 'trim');
+ $this->form_validation->set_rules('excerpt', 'lang:excerpt', 'trim');
+ $this->form_validation->set_rules('sequence', 'lang:sequence', 'trim|integer');
$this->form_validation->set_rules('parent_id', 'parent_id', 'trim');
- $this->form_validation->set_rules('image', 'image', 'trim');
- $this->form_validation->set_rules('seo_title', 'SEO Title', 'trim');
- $this->form_validation->set_rules('meta', 'Meta', 'trim');
+ $this->form_validation->set_rules('image', 'lang:image', 'trim');
+ $this->form_validation->set_rules('seo_title', 'lang:seo_title', 'trim');
+ $this->form_validation->set_rules('meta', 'lang:meta', 'trim');
// validate the form
@@ -177,7 +196,7 @@ function form($id = false)
if(!$uploaded)
{
$error = $this->upload->display_errors();
- if($error != 'You did not select a file to upload.
')
+ if($error != lang('error_file_upload'))
{
$data['error'] .= $this->upload->display_errors();
$this->load->view($this->config->item('admin_folder').'/category_form', $data);
@@ -227,6 +246,8 @@ function form($id = false)
$this->image_lib->clear();
}
+ $this->load->helper('text');
+
//first check the slug field
$slug = $this->input->post('slug');
@@ -236,7 +257,7 @@ function form($id = false)
$slug = $this->input->post('name');
}
- $slug = url_title($slug, 'dash', TRUE);
+ $slug = url_title(convert_accented_characters($slug), 'dash', TRUE);
//validate the slug
$this->load->model('Routes_model');
@@ -257,12 +278,12 @@ function form($id = false)
$save['name'] = $this->input->post('name');
$save['description'] = $this->input->post('description');
$save['excerpt'] = $this->input->post('excerpt');
- $save['parent_id'] = $this->input->post('parent_id');
- $save['sequence'] = $this->input->post('sequence');
+ $save['parent_id'] = intval($this->input->post('parent_id'));
+ $save['sequence'] = intval($this->input->post('sequence'));
$save['seo_title'] = $this->input->post('seo_title');
$save['meta'] = $this->input->post('meta');
- $save['route_id'] = $route_id;
+ $save['route_id'] = intval($route_id);
$save['slug'] = $slug;
$category_id = $this->Category_model->save($save);
@@ -274,7 +295,7 @@ function form($id = false)
$this->Routes_model->save($route);
- $this->session->set_flashdata('message', 'The "'.$this->input->post('name').'" category has been updated.');
+ $this->session->set_flashdata('message', lang('message_category_saved'));
//go back to the category list
redirect($this->config->item('admin_folder').'/categories');
@@ -293,12 +314,12 @@ function delete($id)
$this->Routes_model->delete($category->route_id);
$this->Category_model->delete($id);
- $this->session->set_flashdata('message', 'The "'.$category->name.'" category has been deleted from the system.');
+ $this->session->set_flashdata('message', lang('message_delete_category'));
redirect($this->config->item('admin_folder').'/categories');
}
else
{
- $this->session->set_flashdata('error', 'The requested category could not be found.');
+ $this->session->set_flashdata('error', lang('error_not_found'));
}
}
}
\ No newline at end of file
diff --git a/gocart/controllers/admin/coupons.php b/gocart/controllers/admin/coupons.php
index aac6cea5..c0bba847 100644
--- a/gocart/controllers/admin/coupons.php
+++ b/gocart/controllers/admin/coupons.php
@@ -1,6 +1,6 @@
load->library('Auth');
$this->auth->check_access('Admin', true);
$this->load->model('Coupon_model');
$this->load->model('Product_model');
-
- //this adds the redirect url to our flash data, incase they are not logged in
- $this->auth->is_logged_in(uri_string());
+ $this->lang->load('coupon');
}
function index()
{
- $data['page_title'] = 'Coupons';
+ $data['page_title'] = lang('coupons');
$data['coupons'] = $this->Coupon_model->get_coupons();
$this->load->view($this->config->item('admin_folder').'/coupons', $data);
@@ -37,7 +33,7 @@ function form($id = false)
$this->coupon_id = $id;
- $data['page_title'] = 'Add Coupon';
+ $data['page_title'] = lang('coupon_form');
//default values are empty if the product is new
$data['id'] = '';
@@ -60,13 +56,10 @@ function form($id = false)
//if the product does not exist, redirect them to the product list with an error
if (!$coupon)
{
- $this->session->set_flashdata('message', 'The requested coupon could not be found.');
+ $this->session->set_flashdata('message', lang('error_not_found'));
redirect($this->config->item('admin_folder').'/product');
}
- //set title to edit if we have an ID
- $data['page_title'] = 'Edit Coupon';
-
//set values to db values
$data['id'] = $coupon->id;
$data['code'] = $coupon->code;
@@ -83,15 +76,15 @@ function form($id = false)
$added = $this->Coupon_model->get_product_ids($id);
}
- $this->form_validation->set_rules('code', 'Code', 'trim|required|callback_check_code');
- $this->form_validation->set_rules('max_uses', 'Max Uses', 'trim|numeric');
- $this->form_validation->set_rules('max_product_instances', 'Max Instances', 'trim|numeric');
- $this->form_validation->set_rules('whole_order_coupon', 'Whole Order Discount?');
- $this->form_validation->set_rules('reduction_target', 'Reduction Target', 'trim|required');
- $this->form_validation->set_rules('reduction_type', 'Reduction Type', 'trim');
- $this->form_validation->set_rules('reduction_amount', 'Reduction Amount', 'trim|numeric');
- $this->form_validation->set_rules('start_date', 'Start Date');
- $this->form_validation->set_rules('end_date', 'End Date');
+ $this->form_validation->set_rules('code', 'lang:code', 'trim|required|callback_check_code');
+ $this->form_validation->set_rules('max_uses', 'lang:max_uses', 'trim|numeric');
+ $this->form_validation->set_rules('max_product_instances', 'lang:limit_per_order', 'trim|numeric');
+ $this->form_validation->set_rules('whole_order_coupon', 'lang:whole_order_discount');
+ $this->form_validation->set_rules('reduction_target', 'lang:reduction_target', 'trim|required');
+ $this->form_validation->set_rules('reduction_type', 'lang:reduction_type', 'trim');
+ $this->form_validation->set_rules('reduction_amount', 'lang:reduction_amount', 'trim|numeric');
+ $this->form_validation->set_rules('start_date', 'lang:start_date');
+ $this->form_validation->set_rules('end_date', 'lang:end_date');
// create product list
$products = $this->Product_model->get_products();
@@ -161,14 +154,7 @@ function form($id = false)
}
// We're done
- if (!$id)
- {
- $this->session->set_flashdata('message', 'The "'.$this->input->post('code').'" coupon code has been added.');
- }
- else
- {
- $this->session->set_flashdata('message', 'Information for the "'.$this->input->post('code').'" coupon code has been updated.');
- }
+ $this->session->set_flashdata('message', lang('message_saved_coupon'));
//go back to the product list
redirect($this->config->item('admin_folder').'/coupons');
@@ -181,7 +167,7 @@ function check_code($str)
$code = $this->Coupon_model->check_code($str, $this->coupon_id);
if ($code)
{
- $this->form_validation->set_message('check_code', 'The requested code is already in use.');
+ $this->form_validation->set_message('check_code', lang('error_already_used'));
return FALSE;
}
else
@@ -198,24 +184,22 @@ function delete($id = false)
//if the promo does not exist, redirect them to the customer list with an error
if (!$coupon)
{
- $this->session->set_flashdata('message', 'The requested coupon could not be found.');
+ $this->session->set_flashdata('error', lang('error_not_found'));
redirect($this->config->item('admin_folder').'/coupons');
}
else
{
$this->Coupon_model->delete_coupon($id);
- $this->session->set_flashdata('message', 'The "'.$coupon->code.'" coupon has been deleted from the system.');
+ $this->session->set_flashdata('message', lang('message_coupon_deleted'));
redirect($this->config->item('admin_folder').'/coupons');
}
}
else
{
//if they do not provide an id send them to the promo list page with an error
- $this->session->set_flashdata('message', 'The requested coupon could not be found.');
+ $this->session->set_flashdata('message', lang('error_not_found'));
redirect($this->config->item('admin_folder').'/coupons');
}
}
-}
-
-?>
+}
\ No newline at end of file
diff --git a/gocart/controllers/admin/customers.php b/gocart/controllers/admin/customers.php
old mode 100755
new mode 100644
index b0048f76..272c748c
--- a/gocart/controllers/admin/customers.php
+++ b/gocart/controllers/admin/customers.php
@@ -1,6 +1,6 @@
load->library('Auth');
+
$this->load->model(array('Customer_model', 'Location_model'));
$this->load->helper('formatting_helper');
- //this adds the redirect url to our flash data, incase they are not logged in
- $this->auth->is_logged_in(uri_string());
+ $this->lang->load('customer');
}
function index($field='lastname', $by='ASC', $page=0)
@@ -20,7 +19,7 @@ function index($field='lastname', $by='ASC', $page=0)
//we're going to use flash data and redirect() after form submissions to stop people from refreshing and duplicating submissions
//$this->session->set_flashdata('message', 'this is our message');
- $data['page_title'] = 'Customers';
+ $data['page_title'] = lang('customers');
$data['customers'] = $this->Customer_model->get_customers(50,$page, $field, $by);
$this->load->library('pagination');
@@ -29,7 +28,29 @@ function index($field='lastname', $by='ASC', $page=0)
$config['total_rows'] = $this->Customer_model->count_customers();
$config['per_page'] = 50;
$config['uri_segment'] = 6;
+ $config['first_link'] = 'First';
+ $config['first_tag_open'] = '';
+ $config['first_tag_close'] = '';
+ $config['last_link'] = 'Last';
+ $config['last_tag_open'] = '';
+ $config['last_tag_close'] = '';
+
+ $config['full_tag_open'] = '';
+ $config['cur_tag_open'] = '';
+ $config['cur_tag_close'] = '';
+
+ $config['num_tag_open'] = '';
+ $config['num_tag_close'] = '';
+
+ $config['prev_link'] = '«';
+ $config['prev_tag_open'] = '';
+ $config['prev_tag_close'] = '';
+ $config['next_link'] = '»';
+ $config['next_tag_open'] = '';
+ $config['next_tag_close'] = '';
+
$this->pagination->initialize($config);
@@ -47,7 +68,7 @@ function export_xml()
$data['customers'] = (array)$this->Customer_model->get_customers();
- force_download('users.xml', $this->load->view($this->config->item('admin_folder').'/customers_xml', $data, true));
+ force_download_content('customers.xml', $this->load->view($this->config->item('admin_folder').'/customers_xml', $data, true));
//$this->load->view($this->config->item('admin_folder').'/customers_xml', $data);
}
@@ -58,22 +79,21 @@ function form($id = false)
$this->load->helper('form');
$this->load->library('form_validation');
- $data['page_title'] = 'Add Customer';
+ $data['page_title'] = lang('customer_form');
//default values are empty if the customer is new
- $data['id'] = '';
- $data['group_id'] = '';
- $data['firstname'] = '';
- $data['lastname'] = '';
- $data['email'] = '';
- $data['phone'] = '';
- $data['company'] = '';
- $data['email_subscribe'] = '';
- $data['active'] = false;
+ $data['id'] = '';
+ $data['group_id'] = '';
+ $data['firstname'] = '';
+ $data['lastname'] = '';
+ $data['email'] = '';
+ $data['phone'] = '';
+ $data['company'] = '';
+ $data['email_subscribe'] = '';
+ $data['active'] = false;
// get group list
$groups = $this->Customer_model->get_groups();
- $group_list[0]='';
foreach($groups as $group)
{
$group_list[$group->id] = $group->name;
@@ -89,40 +109,37 @@ function form($id = false)
//if the customer does not exist, redirect them to the customer list with an error
if (!$customer)
{
- $this->session->set_flashdata('message', 'The requested customer could not be found.');
+ $this->session->set_flashdata('error', lang('error_not_found'));
redirect($this->config->item('admin_folder').'/customers');
}
- //set title to edit if we have an ID
- $data['page_title'] = 'Edit Customer';
-
//set values to db values
- $data['id'] = $customer->id;
- $data['group_id'] = $customer->group_id;
- $data['firstname'] = $customer->firstname;
- $data['lastname'] = $customer->lastname;
- $data['email'] = $customer->email;
- $data['phone'] = $customer->phone;
- $data['company'] = $customer->company;
- $data['active'] = $customer->active;
- $data['email_subscribe'] = $customer->email_subscribe;
+ $data['id'] = $customer->id;
+ $data['group_id'] = $customer->group_id;
+ $data['firstname'] = $customer->firstname;
+ $data['lastname'] = $customer->lastname;
+ $data['email'] = $customer->email;
+ $data['phone'] = $customer->phone;
+ $data['company'] = $customer->company;
+ $data['active'] = $customer->active;
+ $data['email_subscribe'] = $customer->email_subscribe;
}
- $this->form_validation->set_rules('firstname', 'First Name', 'trim|required|max_length[32]');
- $this->form_validation->set_rules('lastname', 'Last Name', 'trim|required|max_length[32]');
- $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email|max_length[128]|callback_check_email');
- $this->form_validation->set_rules('phone', 'Phone', 'trim|required|max_length[32]');
- $this->form_validation->set_rules('company', 'Company', 'trim|max_length[128]');
- $this->form_validation->set_rules('active', 'Active');
- $this->form_validation->set_rules('group_id', 'numeric');
- $this->form_validation->set_rules('email_subscribe', 'numeric|max_length[1]');
+ $this->form_validation->set_rules('firstname', 'lang:firstname', 'trim|required|max_length[32]');
+ $this->form_validation->set_rules('lastname', 'lang:lastname', 'trim|required|max_length[32]');
+ $this->form_validation->set_rules('email', 'lang:email', 'trim|required|valid_email|max_length[128]|callback_check_email');
+ $this->form_validation->set_rules('phone', 'lang:phone', 'trim|required|max_length[32]');
+ $this->form_validation->set_rules('company', 'lang:company', 'trim|max_length[128]');
+ $this->form_validation->set_rules('active', 'lang:active');
+ $this->form_validation->set_rules('group_id', 'group_id', 'numeric');
+ $this->form_validation->set_rules('email_subscribe', 'email_subscribe', 'numeric|max_length[1]');
//if this is a new account require a password, or if they have entered either a password or a password confirmation
if ($this->input->post('password') != '' || $this->input->post('confirm') != '' || !$id)
{
- $this->form_validation->set_rules('password', 'Password', 'required|min_length[6]|sha1');
- $this->form_validation->set_rules('confirm', 'Confirm Password', 'required|matches[password]');
+ $this->form_validation->set_rules('password', 'lang:password', 'required|min_length[6]|sha1');
+ $this->form_validation->set_rules('confirm', 'lang:confirm_password', 'required|matches[password]');
}
@@ -150,14 +167,7 @@ function form($id = false)
$this->Customer_model->save($save);
- if (!$id)
- {
- $this->session->set_flashdata('message', $this->input->post('firstname').' '.$this->input->post('lastname').' has been added.');
- }
- else
- {
- $this->session->set_flashdata('message', $this->input->post('firstname').' '.$this->input->post('lastname').'\'s information has been updated.');
- }
+ $this->session->set_flashdata('message', lang('message_saved_customer'));
//go back to the customer list
redirect($this->config->item('admin_folder').'/customers');
@@ -171,14 +181,13 @@ function addresses($id = false)
//if the customer does not exist, redirect them to the customer list with an error
if (!$data['customer'])
{
- $this->session->set_flashdata('message', 'The requested customer could not be found.');
+ $this->session->set_flashdata('error', lang('error_not_found'));
redirect($this->config->item('admin_folder').'/customers');
}
$data['addresses'] = $this->Customer_model->get_address_list($id);
- //set title to edit if we have an ID
- $data['page_title'] = $data['customer']->lastname.', '.$data['customer']->firstname.' Addresses';
+ $data['page_title'] = sprintf(lang('addresses_for'), $data['customer']->firstname.' '.$data['customer']->lastname);
$this->load->view($this->config->item('admin_folder').'/customer_addresses', $data);
}
@@ -191,7 +200,7 @@ function delete($id = false)
//if the customer does not exist, redirect them to the customer list with an error
if (!$customer)
{
- $this->session->set_flashdata('message', 'The requested customer could not be found.');
+ $this->session->set_flashdata('error', lang('error_not_found'));
redirect($this->config->item('admin_folder').'/customers');
}
else
@@ -199,14 +208,14 @@ function delete($id = false)
//if the customer is legit, delete them
$delete = $this->Customer_model->delete($id);
- $this->session->set_flashdata('message', $customer->firstname.' '.$customer->lastname.' has been deleted from the system.');
+ $this->session->set_flashdata('message', lang('message_customer_deleted'));
redirect($this->config->item('admin_folder').'/customers');
}
}
else
{
//if they do not provide an id send them to the customer list page with an error
- $this->session->set_flashdata('message', 'The requested customer could not be found.');
+ $this->session->set_flashdata('error', lang('error_not_found'));
redirect($this->config->item('admin_folder').'/customers');
}
}
@@ -217,7 +226,7 @@ function check_email($str)
$email = $this->Customer_model->check_email($str, $this->customer_id);
if ($email)
{
- $this->form_validation->set_message('check_email', 'The requested email is already in use.');
+ $this->form_validation->set_message('check_email', lang('error_email_in_use'));
return FALSE;
}
else
@@ -249,23 +258,16 @@ function get_subscriber_list()
$sub_list .= $subscriber['email'].",\n";
}
- // start output
- header('Content-Type: "text/csv"');
- header('Content-Disposition: attachment; filename="email_subscribers_list.csv"');
- header('Expires: 0');
- header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
- header("Content-Transfer-Encoding: binary");
- header('Pragma: public');
+ $data['sub_list'] = $sub_list;
- echo $sub_list;
+ $this->load->view($this->config->item('admin_folder').'/customer_subscriber_list', $data);
}
- //// customer groups
-
+ // customer groups
function groups()
{
- $data['groups'] = $this->Customer_model->get_groups();
- $data['page_title'] = 'Customer Groups';
+ $data['groups'] = $this->Customer_model->get_groups();
+ $data['page_title'] = lang('customer_groups');
$this->load->view($this->config->item('admin_folder').'/customer_groups', $data);
}
@@ -275,7 +277,7 @@ function edit_group($id=0)
$this->load->helper('form');
$this->load->library('form_validation');
- $data['page_title'] = 'Add Customer Group';
+ $data['page_title'] = lang('customer_group_form');
//default values are empty if the customer is new
$data['id'] = '';
@@ -291,13 +293,11 @@ function edit_group($id=0)
$data['name'] = $group->name;
$data['discount'] = $group->discount;
$data['discount_type'] = $group->discount_type;
-
- $data['page_title'] = 'Edit Customer Group';
}
- $this->form_validation->set_rules('name', 'Group Name', 'trim|required|max_length[50]');
- $this->form_validation->set_rules('discount', 'Discount', 'trim|required|numeric');
- $this->form_validation->set_rules('discount_type', 'Discount Type', 'trim|required');
+ $this->form_validation->set_rules('name', 'lang:group_name', 'trim|required|max_length[50]');
+ $this->form_validation->set_rules('discount', 'lang:discount', 'trim|required|numeric');
+ $this->form_validation->set_rules('discount_type', 'lang:discount_type', 'trim|required');
if ($this->form_validation->run() == FALSE)
{
@@ -311,26 +311,16 @@ function edit_group($id=0)
$save['id'] = $id;
}
- $save['name'] = set_value('name');
- $save['discount'] = set_value('discount');
- $save['discount_type'] = set_value('discount_type');
+ $save['name'] = set_value('name');
+ $save['discount'] = set_value('discount');
+ $save['discount_type'] = set_value('discount_type');
$this->Customer_model->save_group($save);
-
- if (!$id)
- {
- $this->session->set_flashdata('message', 'The group "'.set_value('name').'" has been added.');
- }
- else
- {
- $this->session->set_flashdata('message', 'The group "'.set_value('name').'" has been updated.');
- }
+ $this->session->set_flashdata('message', lang('message_saved_group'));
//go back to the customer group list
redirect($this->config->item('admin_folder').'/customers/groups');
-
}
-
}
@@ -347,7 +337,10 @@ function get_group()
function delete_group($id)
{
- if(empty($id)) return;
+ if(empty($id))
+ {
+ return;
+ }
$this->Customer_model->delete_group($id);
@@ -379,13 +372,12 @@ function address_form($customer_id, $id = false)
$data['customer_id'] = $customer_id;
- $data['page_title'] = 'Add Address';
+ $data['page_title'] = lang('address_form');
//get the countries list for the dropdown
$data['countries_menu'] = $this->Location_model->get_countries_menu();
if($id)
{
- $data['page_title'] = 'Edit Address';
$address = $this->Customer_model->get_address($id);
//fully escape the address
@@ -402,17 +394,17 @@ function address_form($customer_id, $id = false)
$data['zones_menu'] = $this->Location_model->get_zones_menu(array_shift(array_keys($data['countries_menu'])));
}
$this->load->library('form_validation');
- $this->form_validation->set_rules('company', 'Company', 'trim|max_length[128]');
- $this->form_validation->set_rules('firstname', 'First Name', 'trim|required|max_length[32]');
- $this->form_validation->set_rules('lastname', 'Last Name', 'trim|required|max_length[32]');
- $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email|max_length[128]');
- $this->form_validation->set_rules('phone', 'Phone', 'trim|required|max_length[32]');
- $this->form_validation->set_rules('address1', 'Address', 'trim|required|max_length[128]');
- $this->form_validation->set_rules('address2', 'Address', 'trim|max_length[128]');
- $this->form_validation->set_rules('city', 'City', 'trim|required');
- $this->form_validation->set_rules('country_id', 'Country', 'trim|required');
- $this->form_validation->set_rules('zone_id', 'State', 'trim|required');
- $this->form_validation->set_rules('zip', 'Zip', 'trim|required|max_length[32]');
+ $this->form_validation->set_rules('company', 'lang:company', 'trim|max_length[128]');
+ $this->form_validation->set_rules('firstname', 'lang:firstname', 'trim|required|max_length[32]');
+ $this->form_validation->set_rules('lastname', 'lang:lastname', 'trim|required|max_length[32]');
+ $this->form_validation->set_rules('email', 'lang:email', 'trim|required|valid_email|max_length[128]');
+ $this->form_validation->set_rules('phone', 'lang:phone', 'trim|required|max_length[32]');
+ $this->form_validation->set_rules('address1', 'lang:address', 'trim|required|max_length[128]');
+ $this->form_validation->set_rules('address2', 'lang:address', 'trim|max_length[128]');
+ $this->form_validation->set_rules('city', 'lang:city', 'trim|required');
+ $this->form_validation->set_rules('country_id', 'lang:country', 'trim|required');
+ $this->form_validation->set_rules('zone_id', 'lang:state', 'trim|required');
+ $this->form_validation->set_rules('zip', 'lang:postcode', 'trim|required|max_length[32]');
if ($this->form_validation->run() == FALSE)
{
@@ -445,7 +437,7 @@ function address_form($customer_id, $id = false)
$a['field_data']['country_code'] = $country->iso_code_2; // some shipping libraries require the code
$this->Customer_model->save_address($a);
- $this->session->set_flashdata('message', 'Your address has been saved!');
+ $this->session->set_flashdata('message', lang('message_saved_address'));
redirect($this->config->item('admin_folder').'/customers/addresses/'.$customer_id);
}
@@ -460,7 +452,7 @@ function delete_address($customer_id = false, $id = false)
//if the customer does not exist, redirect them to the customer list with an error
if (!$address)
{
- $this->session->set_flashdata('message', 'The requested address could not be found.');
+ $this->session->set_flashdata('error', lang('error_address_not_found'));
if($customer_id)
{
@@ -475,9 +467,9 @@ function delete_address($customer_id = false, $id = false)
else
{
//if the customer is legit, delete them
- $delete = $this->Customer_model->delete_address($id, $customer_id);
+ $delete = $this->Customer_model->delete_address($id, $customer_id);
+ $this->session->set_flashdata('message', lang('message_address_deleted'));
- $this->session->set_flashdata('message', 'An address has been deleted from the system.');
if($customer_id)
{
redirect($this->config->item('admin_folder').'/customers/addresses/'.$customer_id);
@@ -491,7 +483,7 @@ function delete_address($customer_id = false, $id = false)
else
{
//if they do not provide an id send them to the customer list page with an error
- $this->session->set_flashdata('message', 'The requested address could not be found.');
+ $this->session->set_flashdata('error', lang('error_address_not_found'));
if($customer_id)
{
diff --git a/gocart/controllers/admin/dashboard.php b/gocart/controllers/admin/dashboard.php
index 806bf1ea..67d1051d 100644
--- a/gocart/controllers/admin/dashboard.php
+++ b/gocart/controllers/admin/dashboard.php
@@ -1,29 +1,31 @@
load->library('Auth');
- $this->load->model('Order_model');
- $this->load->model('Customer_model');
- $this->load->helper('date');
-
- //this adds the redirect url to our flash data, incase they are not logged in
- $this->auth->is_logged_in(uri_string());
-
if($this->auth->check_access('Orders'))
{
redirect($this->config->item('admin_folder').'/orders');
}
+
+ $this->load->model('Order_model');
+ $this->load->model('Customer_model');
+ $this->load->helper('date');
+
+ $this->lang->load('dashboard');
}
function index()
{
- $data['page_title'] = 'Dashboard';
+ //check to see if shipping and payment modules are installed
+ $data['payment_module_installed'] = (bool)count($this->Settings_model->get_settings('payment_modules'));
+ $data['shipping_module_installed'] = (bool)count($this->Settings_model->get_settings('shipping_modules'));
+
+ $data['page_title'] = lang('dashboard');
// get 5 latest orders
$data['orders'] = $this->Order_model->get_orders(false, '' , 'DESC', 5);
diff --git a/gocart/controllers/admin/digital_products.php b/gocart/controllers/admin/digital_products.php
new file mode 100644
index 00000000..cb681b65
--- /dev/null
+++ b/gocart/controllers/admin/digital_products.php
@@ -0,0 +1,93 @@
+lang->load('digital_product');
+ $this->load->model('digital_product_model');
+ }
+
+ function index()
+ {
+ $data['page_title'] = lang('dgtl_pr_header');
+ $data['file_list'] = $this->digital_product_model->get_list();
+
+ $this->load->view($this->config->item('admin_folder').'/digital_products', $data);
+ }
+
+ function form($id=0)
+ {
+ $this->load->helper('form_helper');
+ $this->load->library('form_validation');
+ $this->form_validation->set_error_delimiters('', '
');
+
+ $data = array( 'id' =>''
+ ,'filename' =>''
+ ,'max_downloads' =>''
+ ,'title' =>''
+ ,'size' =>''
+ );
+ if($id)
+ {
+ $data = array_merge($data, (array)$this->digital_product_model->get_file_info($id));
+ }
+
+ $data['page_title'] = lang('digital_products_form');
+
+ $this->form_validation->set_rules('max_downloads', 'lang:max_downloads', 'numeric');
+ $this->form_validation->set_rules('title', 'lang:title', 'trim|required');
+
+
+ if ($this->form_validation->run() == FALSE)
+ {
+ $this->load->view($this->config->item('admin_folder').'/digital_product_form', $data);
+ } else {
+
+
+ if($id==0)
+ {
+ $data['file_name'] = false;
+ $data['error'] = false;
+
+ $config['allowed_types'] = '*';
+ $config['upload_path'] = 'uploads/digital_uploads';//$this->config->item('digital_products_path');
+ $config['remove_spaces'] = true;
+
+ $this->load->library('upload', $config);
+
+ if($this->upload->do_upload())
+ {
+ $upload_data = $this->upload->data();
+ } else {
+ $data['error'] = $this->upload->display_errors();
+ $this->load->view($this->config->item('admin_folder').'/digital_product_form', $data);
+ return;
+ }
+
+ $save['filename'] = $upload_data['file_name'];
+ $save['size'] = $upload_data['file_size'];
+ } else {
+ $save['id'] = $id;
+ }
+
+ $save['max_downloads'] = set_value('max_downloads');
+ $save['title'] = set_value('title');
+
+ $this->digital_product_model->save($save);
+
+ redirect($this->config->item('admin_folder').'/digital_products');
+ }
+ }
+
+ function delete($id)
+ {
+ $this->digital_product_model->delete($id);
+
+ $this->session->set_flashdata('message', lang('message_deleted_file'));
+ redirect($this->config->item('admin_folder').'/digital_products');
+ }
+
+}
\ No newline at end of file
diff --git a/gocart/controllers/admin/giftcards.php b/gocart/controllers/admin/giftcards.php
index aed16dd2..a9a6c9d5 100644
--- a/gocart/controllers/admin/giftcards.php
+++ b/gocart/controllers/admin/giftcards.php
@@ -1,6 +1,6 @@
load->library('Auth');
$this->load->model('Settings_model');
$this->load->model('Gift_card_model');
$this->load->helper('form');
$this->load->library('form_validation');
- $this->form_validation->set_error_delimiters('', '
');
- //this adds the redirect url to our flash data, incase they are not logged in
- $this->auth->is_logged_in(uri_string());
+ $this->lang->load('giftcard');
}
function index()
{
- $data['page_title'] = "Gift Cards List";
+ $data['page_title'] = lang('giftcards');
$data['cards'] = $this->Gift_card_model->get_all_new();
$gc_settings = $this->Settings_model->get_settings('gift_cards');
@@ -41,13 +38,14 @@ function index()
function form()
{
- $this->form_validation->set_rules('to_email', 'Recipient Email Address', 'trim|required');
- $this->form_validation->set_rules('to_name', 'Recipient Name', 'trim|required');
- $this->form_validation->set_rules('from', 'Sender Name', 'trim|required');
- $this->form_validation->set_rules('personal_message', 'Personal Message', 'trim');
- $this->form_validation->set_rules('beginning_amount', 'Amount', 'trim|required|numeric');
- $data['page_title'] = "Add Gift Card";
+ $this->form_validation->set_rules('to_email', 'lang:recipient_email', 'trim|required');
+ $this->form_validation->set_rules('to_name', 'lang:recipient_name', 'trim|required');
+ $this->form_validation->set_rules('from', 'lang:sender_name', 'trim|required');
+ $this->form_validation->set_rules('personal_message', 'lang:personal_message', 'trim');
+ $this->form_validation->set_rules('beginning_amount', 'lang:amount', 'trim|required|numeric');
+
+ $data['page_title'] = lang('add_giftcard');
if ($this->form_validation->run() == FALSE)
{
@@ -55,8 +53,7 @@ function form()
}
else
{
-
- $save['code'] = $this->Gift_card_model->generate_password();
+ $save['code'] = generate_code(); // from the string helper
$save['to_email'] = $this->input->post('to_email');
$save['to_name'] = $this->input->post('to_name');
$save['from'] = $this->input->post('from');
@@ -96,7 +93,7 @@ function form()
$this->email->send();
}
- $this->session->set_flashdata('message', 'Gift Card saved');
+ $this->session->set_flashdata('message', lang('message_saved_giftcard'));
redirect($this->config->item('admin_folder').'/giftcards');
}
@@ -107,7 +104,7 @@ function activate($code)
{
$this->Gift_card_model->activate($code);
$this->Gift_card_model->send_notification($code);
- $this->session->set_flashdata('message', 'Gift Card Activated');
+ $this->session->set_flashdata('message', lang('message_activated_giftcard'));
redirect($this->config->item('admin_folder').'/giftcards');
}
@@ -115,7 +112,7 @@ function delete($id)
{
$this->Gift_card_model->delete($id);
- $this->session->set_flashdata('message', 'Gift Card Deleted');
+ $this->session->set_flashdata('message', lang('message_deleted_giftcard'));
redirect($this->config->item('admin_folder').'/giftcards');
}
@@ -144,10 +141,10 @@ function settings()
$data['predefined_card_amounts'] = $gc_settings['predefined_card_amounts'];
$data['allow_custom_amount'] = $gc_settings['allow_custom_amount'];
- $this->form_validation->set_rules('predefined_card_amounts', 'Predefined Card Amounts', 'trim');
- $this->form_validation->set_rules('allow_custom_amount', 'Allow Custom Amounts', 'trim');
+ $this->form_validation->set_rules('predefined_card_amounts', 'lang:predefined_card_amounts', 'trim');
+ $this->form_validation->set_rules('allow_custom_amount', 'lang:allow_custom_amounts', 'trim');
- $data['page_title'] = 'Gift Card Settings';
+ $data['page_title'] = lang('giftcard_settings');
if ($this->form_validation->run() == FALSE)
{
@@ -161,7 +158,7 @@ function settings()
$this->Settings_model->save_settings('gift_cards', $save);
- $this->session->set_flashdata('message', 'Gift Card settings saved');
+ $this->session->set_flashdata('message', lang('message_saved_settings'));
redirect($this->config->item('admin_folder').'/giftcards');
diff --git a/gocart/controllers/admin/locations.php b/gocart/controllers/admin/locations.php
index 83450bc0..41978346 100644
--- a/gocart/controllers/admin/locations.php
+++ b/gocart/controllers/admin/locations.php
@@ -1,23 +1,20 @@
load->library('Auth');
$this->auth->check_access('Admin', true);
$this->load->model('Location_model');
-
- //this adds the redirect url to our flash data, incase they are not logged in
- $this->auth->is_logged_in(uri_string());
+ $this->lang->load('location');
}
function index()
{
- $data['page_title'] = 'Countries';
+ $data['page_title'] = lang('countries');
$data['locations'] = $this->Location_model->get_countries();
$this->load->view($this->config->item('admin_folder').'/countries', $data);
@@ -37,7 +34,7 @@ function country_form($id = false)
$this->form_validation->set_error_delimiters('', '
');
- $data['page_title'] = 'Add Country';
+ $data['page_title'] = lang('country_form');
//default values are empty if the product is new
$data['id'] = '';
@@ -55,23 +52,20 @@ function country_form($id = false)
//if the country does not exist, redirect them to the country list with an error
if (!$country)
{
- $this->session->set_flashdata('message', 'The requested country could not be found.');
+ $this->session->set_flashdata('error', lang('error_country_not_found'));
redirect($this->config->item('admin_folder').'/locations');
}
- //set title to edit if we have an ID
- $data['page_title'] = 'Edit Country';
-
$data = array_merge($data, $country);
}
- $this->form_validation->set_rules('name', 'Name', 'trim|required');
- $this->form_validation->set_rules('iso_code_2', 'ISO Code 2', 'trim|required');
- $this->form_validation->set_rules('iso_code_3', 'ISO Code 3', 'trim|required');
- $this->form_validation->set_rules('address_format', 'Address Format', 'trim');
- $this->form_validation->set_rules('postcode_required', 'Post Code Required', 'trim');
- $this->form_validation->set_rules('tax', 'Tax', 'trim|numeric');
- $this->form_validation->set_rules('status', 'Status', 'trim');
+ $this->form_validation->set_rules('name', 'lang:name', 'trim|required');
+ $this->form_validation->set_rules('iso_code_2', 'lang:iso_code_2', 'trim|required');
+ $this->form_validation->set_rules('iso_code_3', 'lang:iso_code_3', 'trim|required');
+ $this->form_validation->set_rules('address_format', 'lang:address_format', 'trim');
+ $this->form_validation->set_rules('postcode_required', 'lang:require_postcode', 'trim');
+ $this->form_validation->set_rules('tax', 'lang:tax', 'trim|numeric');
+ $this->form_validation->set_rules('status', 'lang:status', 'trim');
if ($this->form_validation->run() == FALSE)
{
@@ -90,15 +84,7 @@ function country_form($id = false)
$promo_id = $this->Location_model->save_country($save);
- // We're done
- if (!$id)
- {
- $this->session->set_flashdata('message', 'The "'.$this->input->post('name').'" Country has been added.');
- }
- else
- {
- $this->session->set_flashdata('message', 'Information for the "'.$this->input->post('name').'" Country has been updated.');
- }
+ $this->session->set_flashdata('message', lang('message_saved_country'));
//go back to the product list
redirect($this->config->item('admin_folder').'/locations');
@@ -114,21 +100,21 @@ function delete_country($id = false)
//if the promo does not exist, redirect them to the customer list with an error
if (!$location)
{
- $this->session->set_flashdata('message', 'The requested Coutnry could not be found.');
+ $this->session->set_flashdata('error', lang('error_country_not_found'));
redirect($this->config->item('admin_folder').'/locations');
}
else
{
$this->Location_model->delete_country($id);
- $this->session->set_flashdata('message', 'The "'.$location->name.'" Country has been deleted from the system.');
+ $this->session->set_flashdata('message', lang('message_deleted_country'));
redirect($this->config->item('admin_folder').'/locations');
}
}
else
{
//if they do not provide an id send them to the promo list page with an error
- $this->session->set_flashdata('message', 'The requested Country could not be found.');
+ $this->session->set_flashdata('error', lang('error_country_not_found'));
redirect($this->config->item('admin_folder').'/locations');
}
}
@@ -141,21 +127,21 @@ function delete_zone($id = false)
//if the promo does not exist, redirect them to the customer list with an error
if (!$location)
{
- $this->session->set_flashdata('message', 'The requested zone could not be found.');
+ $this->session->set_flashdata('error', lang('error_zone_not_found'));
redirect($this->config->item('admin_folder').'/locations');
}
else
{
$this->Location_model->delete_zone($id);
- $this->session->set_flashdata('message', 'The "'.$location->name.'" Zone has been deleted from the system.');
+ $this->session->set_flashdata('message', lang('message_deleted_zone'));
redirect($this->config->item('admin_folder').'/locations/zones/'.$location->country_id);
}
}
else
{
//if they do not provide an id send them to the promo list page with an error
- $this->session->set_flashdata('message', 'The requested Zone could not be found.');
+ $this->session->set_flashdata('error', lang('error_zone_not_found'));
redirect($this->config->item('admin_folder').'/locations');
}
}
@@ -166,12 +152,12 @@ function zones($country_id)
$data['country'] = $this->Location_model->get_country($country_id);
if(!$data['country'])
{
- $this->session->set_flashdata('error', 'The requested Country could not be found.');
+ $this->session->set_flashdata('error', lang('error_zone_not_found'));
redirect($this->config->item('admin_folder').'/locations');
}
$data['zones'] = $this->Location_model->get_zones($country_id);
- $data['page_title'] = $data['country']->name. ' Zones';
+ $data['page_title'] = sprintf(lang('country_zones'), $data['country']->name);
$this->load->view($this->config->item('admin_folder').'/country_zones', $data);
}
@@ -184,7 +170,7 @@ function zone_form($id = false)
$this->form_validation->set_error_delimiters('', '
');
$data['countries'] = $this->Location_model->get_countries();
- $data['page_title'] = 'Add Zone';
+ $data['page_title'] = lang('zone_form');
//default values are empty if the product is new
$data['id'] = '';
@@ -201,20 +187,18 @@ function zone_form($id = false)
//if the country does not exist, redirect them to the country list with an error
if (!$zone)
{
- $this->session->set_flashdata('message', 'The requested zone could not be found.');
+ $this->session->set_flashdata('error', lang('error_zone_not_found'));
redirect($this->config->item('admin_folder').'/locations');
}
- //set title to edit if we have an ID
- $data['page_title'] = 'Edit Zone';
$data = array_merge($data, $zone);
}
$this->form_validation->set_rules('country_id', 'Country ID', 'trim|required');
- $this->form_validation->set_rules('name', 'Name', 'trim|required');
- $this->form_validation->set_rules('code', 'Code', 'trim|required');
- $this->form_validation->set_rules('tax', 'Tax', 'trim|numeric');
- $this->form_validation->set_rules('status', 'Status', 'trim');
+ $this->form_validation->set_rules('name', 'lang:name', 'trim|required');
+ $this->form_validation->set_rules('code', 'lang:code', 'trim|required');
+ $this->form_validation->set_rules('tax', 'lang:tax', 'trim|numeric');
+ $this->form_validation->set_rules('status', 'lang:status', 'trim');
if ($this->form_validation->run() == FALSE)
{
@@ -231,16 +215,7 @@ function zone_form($id = false)
$this->Location_model->save_zone($save);
- // We're done
- if (!$id)
- {
- $this->session->set_flashdata('message', 'The "'.$this->input->post('name').'" zone has been added.');
- }
- else
- {
- $this->session->set_flashdata('message', 'Information for the "'.$this->input->post('name').'" zone has been updated.');
- }
-
+ $this->session->set_flashdata('message', lang('message_zone_saved'));
//go back to the product list
redirect($this->config->item('admin_folder').'/locations/zones/'.$save['country_id']);
}
@@ -263,7 +238,7 @@ function zone_areas($id)
$data['zone'] = $this->Location_model->get_zone($id);
$data['areas'] = $this->Location_model->get_zone_areas($id);
- $data['page_title'] = 'Zone Areas for '.$data['zone']->name;
+ $data['page_title'] = sprintf(lang('zone_areas_for'), $data['zone']->name);
$this->load->view($this->config->item('admin_folder').'/country_zone_areas', $data);
}
@@ -276,21 +251,21 @@ function delete_zone_area($id = false)
//if the promo does not exist, redirect them to the customer list with an error
if (!$location)
{
- $this->session->set_flashdata('message', 'The requested Zone Area could not be found.');
+ $this->session->set_flashdata('error', lang('error_zone_area_not_found'));
redirect($this->config->item('admin_folder').'/locations');
}
else
{
$this->Location_model->delete_zone_area($id);
- $this->session->set_flashdata('message', 'The "'.$location->code.'" Zone Area has been deleted from the system.');
+ $this->session->set_flashdata('message', lang('message_deleted_zone_area'));
redirect($this->config->item('admin_folder').'/locations/zone_areas/'.$location->zone_id);
}
}
else
{
//if they do not provide an id send them to the promo list page with an error
- $this->session->set_flashdata('message', 'The requested Zone Area could not be found.');
+ $this->session->set_flashdata('error', lang('error_zone_area_not_found'));
redirect($this->config->item('admin_folder').'/locations/');
}
}
@@ -303,7 +278,7 @@ function zone_area_form($zone_id, $area_id =false)
$this->form_validation->set_error_delimiters('', '
');
$zone = $this->Location_model->get_zone($zone_id);
- $data['page_title'] = 'Add Zone Area to '.$zone->name;
+ $data['page_title'] = sprintf(lang('zone_area_form'), $zone->name);
//default values are empty if the product is new
$data['id'] = '';
@@ -318,17 +293,15 @@ function zone_area_form($zone_id, $area_id =false)
//if the country does not exist, redirect them to the country list with an error
if (!$area)
{
- $this->session->set_flashdata('message', 'The requested zone area could not be found.');
+ $this->session->set_flashdata('error', lang('error_zone_area_not_found'));
redirect($this->config->item('admin_folder').'/locations/zone_areas/'.$zone_id);
}
- //set title to edit if we have an ID
- $data['page_title'] = 'Edit Zone Area';
$data = array_merge($data, $area);
}
- $this->form_validation->set_rules('code', 'Code', 'trim|required');
- $this->form_validation->set_rules('tax', 'Tax', 'trim|numeric');
+ $this->form_validation->set_rules('code', 'lang:code', 'trim|required');
+ $this->form_validation->set_rules('tax', 'lang:tax', 'trim|numeric');
if ($this->form_validation->run() == FALSE)
{
@@ -343,15 +316,7 @@ function zone_area_form($zone_id, $area_id =false)
$this->Location_model->save_zone_area($save);
- // We're done
- if (!$area_id)
- {
- $this->session->set_flashdata('message', 'The "'.$this->input->post('code').'" zone area has been added.');
- }
- else
- {
- $this->session->set_flashdata('message', 'Information for the "'.$this->input->post('code').'" zone area has been updated.');
- }
+ $this->session->set_flashdata('message', lang('message_saved_zone_area'));
//go back to the product list
redirect($this->config->item('admin_folder').'/locations/zone_areas/'.$save['zone_id']);
diff --git a/gocart/controllers/admin/login.php b/gocart/controllers/admin/login.php
index 57f0f136..48199f98 100644
--- a/gocart/controllers/admin/login.php
+++ b/gocart/controllers/admin/login.php
@@ -9,6 +9,7 @@ function __construct()
force_ssl();
$this->load->library('Auth');
+ $this->lang->load('login');
}
function index()
@@ -45,7 +46,7 @@ function index()
{
//this adds the redirect back to flash data if they provide an incorrect credentials
$this->session->set_flashdata('redirect', $redirect);
- $this->session->set_flashdata('message', 'Authentication Failed');
+ $this->session->set_flashdata('error', lang('error_authentication_failed'));
redirect($this->config->item('admin_folder').'/login');
}
}
@@ -57,7 +58,7 @@ function logout()
$this->auth->logout();
//when someone logs out, automatically redirect them to the login page.
- $this->session->set_flashdata('message', 'You have been logged out.');
+ $this->session->set_flashdata('message', lang('message_logged_out'));
redirect($this->config->item('admin_folder').'/login');
}
diff --git a/gocart/controllers/admin/media.php b/gocart/controllers/admin/media.php
new file mode 100644
index 00000000..2d54157d
--- /dev/null
+++ b/gocart/controllers/admin/media.php
@@ -0,0 +1,190 @@
+path = 'uploads/wysiwyg';
+ $this->auth->check_access('Admin', true);
+ $this->load->helper(array('file', 'form'));
+
+ }
+
+ function index()
+ {
+ $data['root'] = trim(implode('/',array_slice($this->uri->segment_array(), 3)), '/');
+
+ if(!is_dir($this->path.'/'.$data['root']))
+ {
+ redirect(config_item('admin_folder').'/media/index/');
+ }
+
+ $data['files'] = array();
+ $files = get_dir_file_info($this->path.'/'.$data['root']);
+
+ if(!empty($files))
+ {
+ foreach($files as $f)
+ {
+ $data['files'][] = $f['name'];
+ }
+ }
+
+ natcasesort($data['files']);
+
+ $this->load->view(config_item('admin_folder').'/iframe/media', $data);
+ }
+
+ function embed()
+ {
+ //get the file path
+ $data['root'] = array_slice($this->uri->segment_array(), 3);
+ array_pop($data['root']);
+
+ //get the file
+ $data['file'] = trim(implode('/',array_slice($this->uri->segment_array(), 3)), '/');
+
+ if(!file_exists($this->path.'/'.$data['file']))
+ {
+ $this->set_flashdata('error', 'The requested file could not be found');
+ redirect(config_item('admin_folder').'/media/index/');
+ }
+
+ $this->load->view(config_item('admin_folder').'/iframe/header', $data);
+ $this->load->view(config_item('admin_folder').'/iframe/embed', $data);
+ $this->load->view(config_item('admin_folder').'/iframe/footer', $data);
+
+ }
+
+ function edit_image()
+ {
+ $this->load->view(config_item('admin_folder').'/iframe/edit_image');
+ }
+
+ function create_subfolder()
+ {
+ $root = trim($this->input->post('root'), '/');
+ $folder = trim(url_title($this->input->post('folder-name'), '-', true), '/');
+
+ if(empty($folder))
+ {
+ $this->session->set_flashdata('error', 'You must submit a folder name.');
+ }
+ elseif(file_exists($this->path.'/'.$root.'/'.$folder))
+ {
+ $this->session->set_flashdata('error', 'There requested folder name is already in use.');
+ }
+ else
+ {
+ if(mkdir($this->path.'/'.$root.'/'.$folder))
+ {
+ $this->session->set_flashdata('message', 'Your subfolder has been successfully created.');
+ }
+ else
+ {
+ $this->session->set_flashdata('error', 'There was an error creating your folder.');
+ }
+ }
+ redirect(config_item('admin_folder').'/media/index/'.$root);
+ }
+
+ function move_file()
+ {
+ $filename = $this->input->post('filename');
+ $subfolder = $this->input->post('move_to');
+ $root = $this->input->post('root');
+
+ //stop the chance of //
+ if(!empty($root))
+ {
+ $root .='/';
+ }
+
+ $new = $this->path.'/'.$subfolder.'/'.$filename;
+ $old = $this->path.'/'.$root.$filename;
+
+ if(!file_exists($new) && file_exists($old))
+ {
+ rename($old,$new);
+ echo json_encode(true);
+ }
+ else
+ {
+ echo json_encode(false);
+ }
+ }
+
+ function rename_file()
+ {
+
+ $root = trim($this->input->post('root'), '/');
+ $parts = pathinfo($this->input->post('new'));
+
+ $new_filename = url_title($parts['filename'], '-', true);
+ if(!empty($parts['extension']))
+ {
+ $new_filename .= '.'.$parts['extension'];
+ }
+
+ $new = $this->path.'/'.$root.'/'.$new_filename;
+ $old = $this->path.'/'.$root.'/'.$this->input->post('original');
+
+ if(!empty($new_filename) && !file_exists($new) && file_exists($old))
+ {
+ rename($old,$new);
+ $this->session->set_flashdata('message', 'Your file has been successfully renamed.');
+ }
+ else
+ {
+ $this->session->set_flashdata('error', 'There was an error renaming the requested file.');
+ }
+
+ redirect(config_item('admin_folder').'/media/index/'.$root);
+ }
+
+ function delete()
+ {
+ $root = trim($this->input->post('root'), '/');
+ $file = $this->path.'/'.$root.'/'.$this->input->post('filename');
+
+ if(is_dir($file))
+ {
+ delete_files($file, TRUE);
+ rmdir($file);
+ $this->session->set_flashdata('message', 'Your folder has been successfully deleted.');
+ }
+ elseif(file_exists($file))
+ {
+ unlink($file);
+ $this->session->set_flashdata('message', 'Your file has been successfully deleted.');
+ }
+
+ redirect(config_item('admin_folder').'/media/index/'.$root);
+ }
+
+ function upload()
+ {
+ $root = trim($this->input->post('root'), '/');
+
+ $config['upload_path'] = 'uploads/wysiwyg/'.$root;
+ $config['allowed_types'] = 'gif|jpg|png';
+ $config['max_size'] = $this->config->item('size_limit');
+ $config['max_width'] = '1024';
+ $config['max_height'] = '768';
+
+ $this->load->library('upload', $config);
+
+ if ( ! $this->upload->do_upload())
+ {
+ $this->session->set_flashdata('error', $this->upload->display_errors());
+ redirect(config_item('admin_folder').'/media/index/'.$root);
+ }
+ else
+ {
+ $this->session->set_flashdata('message', 'Your file has been successfully uploaded.');
+ redirect(config_item('admin_folder').'/media/index/'.$root);
+ }
+ }
+}
\ No newline at end of file
diff --git a/gocart/controllers/admin/orders.php b/gocart/controllers/admin/orders.php
index 08ff5b8a..3b7dcd80 100644
--- a/gocart/controllers/admin/orders.php
+++ b/gocart/controllers/admin/orders.php
@@ -1,27 +1,47 @@
load->library('Auth');
+
remove_ssl();
- //this adds the redirect url to our flash data, incase they are not logged in
- $this->auth->is_logged_in(uri_string());
-
$this->load->model('Order_model');
$this->load->model('Search_model');
$this->load->model('location_model');
- $this->load->helper(array('formatting', 'utility'));
+ $this->load->helper(array('formatting'));
+ $this->lang->load('order');
}
- function index($sort_by='order_number',$sortorder='desc', $code=0, $page=0, $rows=15)
+ function index($sort_by='order_number',$sort_order='desc', $code=0, $page=0, $rows=15)
{
+
+ //if they submitted an export form do the export
+ if($this->input->post('submit') == 'export')
+ {
+ $this->load->model('customer_model');
+ $this->load->helper('download_helper');
+ $post = $this->input->post(null, false);
+ $term = (object)$post;
+
+ $data['orders'] = $this->Order_model->get_orders($term);
+
+ foreach($data['orders'] as &$o)
+ {
+ $o->items = $this->Order_model->get_items($o->id);
+ }
+
+ force_download_content('orders.xml', $this->load->view($this->config->item('admin_folder').'/orders_xml', $data, true));
+
+ //kill the script from here
+ die;
+ }
+
$this->load->helper('form');
$this->load->helper('date');
$data['message'] = $this->session->flashdata('message');
- $data['page_title'] = 'Orders';
+ $data['page_title'] = lang('orders');
$data['code'] = $code;
$term = false;
@@ -29,9 +49,9 @@ function index($sort_by='order_number',$sortorder='desc', $code=0, $page=0, $row
if($post)
{
//if the term is in post, save it to the db and give me a reference
- $term = json_encode($post);
- $data['code'] = $this->Search_model->record_term($term);
-
+ $term = json_encode($post);
+ $code = $this->Search_model->record_term($term);
+ $data['code'] = $code;
//reset the term to an object for use
$term = (object)$post;
}
@@ -42,20 +62,42 @@ function index($sort_by='order_number',$sortorder='desc', $code=0, $page=0, $row
}
$data['term'] = $term;
- $data['orders'] = $this->Order_model->get_orders($term, $sort_by, $sortorder, $rows, $page);
+ $data['orders'] = $this->Order_model->get_orders($term, $sort_by, $sort_order, $rows, $page);
$data['total'] = $this->Order_model->get_orders_count($term);
$this->load->library('pagination');
- $config['base_url'] = $this->config->item('admin_folder').'/orders/index/'.$sort_by.'/'.$sortorder.'/'.$code.'/';
- $config['total_rows'] = $data['total'];
- $config['per_page'] = $rows;
+ $config['base_url'] = site_url($this->config->item('admin_folder').'/orders/index/'.$sort_by.'/'.$sort_order.'/'.$code.'/');
+ $config['total_rows'] = $data['total'];
+ $config['per_page'] = $rows;
+ $config['uri_segment'] = 7;
+ $config['first_link'] = 'First';
+ $config['first_tag_open'] = '';
+ $config['first_tag_close'] = '';
+ $config['last_link'] = 'Last';
+ $config['last_tag_open'] = '';
+ $config['last_tag_close'] = '';
+
+ $config['full_tag_open'] = '';
+ $config['cur_tag_open'] = '';
+ $config['cur_tag_close'] = '';
+
+ $config['num_tag_open'] = '';
+ $config['num_tag_close'] = '';
+
+ $config['prev_link'] = '«';
+ $config['prev_tag_open'] = '';
+ $config['prev_tag_close'] = '';
+
+ $config['next_link'] = '»';
+ $config['next_tag_open'] = '';
+ $config['next_tag_close'] = '';
$this->pagination->initialize($config);
$data['sort_by'] = $sort_by;
- $data['sortorder'] = $sortorder;
- $data['pages'] = $this->pagination->create_links();
+ $data['sort_order'] = $sort_order;
$this->load->view($this->config->item('admin_folder').'/orders', $data);
}
@@ -74,7 +116,7 @@ function export()
$o->items = $this->Order_model->get_items($o->id);
}
- force_download('orders.xml', $this->load->view($this->config->item('admin_folder').'/orders_xml', $data, true));
+ force_download_content('orders.xml', $this->load->view($this->config->item('admin_folder').'/orders_xml', $data, true));
}
@@ -84,8 +126,12 @@ function view($id)
$this->load->library('form_validation');
$this->load->model('Gift_card_model');
- $this->form_validation->set_rules('notes', 'Notes');
- $this->form_validation->set_rules('status', 'Status', 'required');
+ $this->form_validation->set_rules('notes', 'lang:notes');
+ $this->form_validation->set_rules('status', 'lang:status', 'required');
+
+ $message = $this->session->flashdata('message');
+
+
if ($this->form_validation->run() == TRUE)
{
$save = array();
@@ -93,24 +139,52 @@ function view($id)
$save['notes'] = $this->input->post('notes');
$save['status'] = $this->input->post('status');
- $data['message'] ='The order has been updated!';
+ $data['message'] = lang('message_order_updated');
$this->Order_model->save_order($save);
}
//get the order information, this way if something was posted before the new one gets queried here
- $data['page_title'] = 'View Order';
+ $data['page_title'] = lang('view_order');
$data['order'] = $this->Order_model->get_order($id);
+ /*****************************
+ * Order Notification details *
+ ******************************/
+ // get the list of canned messages (order)
+ $this->load->model('Messages_model');
+ $msg_templates = $this->Messages_model->get_list('order');
+
+ // replace template variables
+ foreach($msg_templates as $msg)
+ {
+ // fix html
+ $msg['content'] = str_replace("\n", '', html_entity_decode($msg['content']));
+
+ // {order_number}
+ $msg['subject'] = str_replace('{order_number}', $data['order']->order_number, $msg['subject']);
+ $msg['content'] = str_replace('{order_number}', $data['order']->order_number, $msg['content']);
+
+ // {url}
+ $msg['subject'] = str_replace('{url}', $this->config->item('base_url'), $msg['subject']);
+ $msg['content'] = str_replace('{url}', $this->config->item('base_url'), $msg['content']);
+
+ // {site_name}
+ $msg['subject'] = str_replace('{site_name}', $this->config->item('company_name'), $msg['subject']);
+ $msg['content'] = str_replace('{site_name}', $this->config->item('company_name'), $msg['content']);
+
+ $data['msg_templates'][] = $msg;
+ }
+
// we need to see if any items are gift cards, so we can generate an activation link
foreach($data['order']->contents as $orderkey=>$product)
{
- if(isset($product['is_gc']))
+ if(isset($product['is_gc']) && (bool)$product['is_gc'])
{
- if($this->Gift_card_model->is_active($product['code']))
+ if($this->Gift_card_model->is_active($product['sku']))
{
- $data['order']->contents[$orderkey]['gc_status'] = '[ Gift Card is Active ]';
+ $data['order']->contents[$orderkey]['gc_status'] = '[ '.lang('giftcard_is_active').' ]';
} else {
- $data['order']->contents[$orderkey]['gc_status'] = ' [ Activate ]';
+ $data['order']->contents[$orderkey]['gc_status'] = ' [ '.lang('activate').' ]';
}
}
}
@@ -140,62 +214,24 @@ function edit_status()
function send_notification($order_id='')
{
-
- $send = $this->input->post('send');
- if(!empty($send))
- {
- // send the message
- $this->load->library('email');
-
- $config['mailtype'] = 'html';
-
- $this->email->initialize($config);
-
- $this->email->from($this->config->item('email'), $this->config->item('company_name'));
- $this->email->to($this->input->post('recipient'));
-
- $this->email->subject($this->input->post('subject'));
- $this->email->message(html_entity_decode($this->input->post('content')));
-
- $this->email->send();
-
- $this->load->view($this->config->item('admin_folder').'/iframe/order_notification.php', array('finished'=>1));
-
- return;
- }
-
-
- $this->load->model('Messages_model');
-
- // get the order details
- $data['order'] = $this->Order_model->get_order($order_id);
-
- // get the list of canned messages (order)
- $data['msg_templates'] = $this->Messages_model->get_list('order');
-
- // replace template variables
- foreach($data['msg_templates'] as &$msg)
- {
- // fix html
- $msg['content'] = str_replace("\n", '', html_entity_decode($msg['content']));
-
- // {order_number}
- $msg['subject'] = str_replace('{order_number}', $data['order']->order_number, $msg['subject']);
- $msg['content'] = str_replace('{order_number}', $data['order']->order_number, $msg['content']);
-
- // {url}
- $msg['subject'] = str_replace('{url}', $this->config->item('base_url'), $msg['subject']);
- $msg['content'] = str_replace('{url}', $this->config->item('base_url'), $msg['content']);
-
- // {site_name}
- $msg['subject'] = str_replace('{site_name}', $this->config->item('company_name'), $msg['subject']);
- $msg['content'] = str_replace('{site_name}', $this->config->item('company_name'), $msg['content']);
-
- }
-
- $this->load->view($this->config->item('admin_folder').'/iframe/order_notification.php', $data);
-
- }
+ // send the message
+ $this->load->library('email');
+
+ $config['mailtype'] = 'html';
+
+ $this->email->initialize($config);
+
+ $this->email->from($this->config->item('email'), $this->config->item('company_name'));
+ $this->email->to($this->input->post('recipient'));
+
+ $this->email->subject($this->input->post('subject'));
+ $this->email->message(html_entity_decode($this->input->post('content')));
+
+ $this->email->send();
+
+ $this->session->set_flashdata('message', lang('sent_notification_message'));
+ redirect($this->config->item('admin_folder').'/orders/view/'.$order_id);
+ }
function bulk_delete()
{
@@ -207,11 +243,11 @@ function bulk_delete()
{
$this->Order_model->delete($order);
}
- $this->session->set_flashdata('message', 'The selected orders have been deleted.');
+ $this->session->set_flashdata('message', lang('message_orders_deleted'));
}
else
{
- $this->session->set_flashdata('error', 'You did not select any orders to delete.');
+ $this->session->set_flashdata('error', lang('error_no_orders_selected'));
}
//redirect as to change the url
redirect($this->config->item('admin_folder').'/orders');
diff --git a/gocart/controllers/admin/pages.php b/gocart/controllers/admin/pages.php
index e8e295b7..830cc06a 100644
--- a/gocart/controllers/admin/pages.php
+++ b/gocart/controllers/admin/pages.php
@@ -1,5 +1,5 @@
load->library('Auth');
- $this->auth->is_logged_in(uri_string());
$this->auth->check_access('Admin', true);
-
$this->load->model('Page_model');
+ $this->lang->load('page');
}
function index()
{
- $data['page_title'] = 'Page Administration';
+ $data['page_title'] = lang('pages');
$data['pages'] = $this->Page_model->get_pages();
@@ -44,20 +42,18 @@ function form($id = false)
$data['seo_title'] = '';
$data['meta'] = '';
- $data['page_title'] = 'Add Page';
+ $data['page_title'] = lang('page_form');
$data['pages'] = $this->Page_model->get_pages();
if($id)
{
- //set the page title to edit page
- $data['page_title'] = 'Edit Page';
$page = $this->Page_model->get_page($id);
if(!$page)
{
//page does not exist
- $this->session->set_flashdata('message', 'The requested page could not be found.');
+ $this->session->set_flashdata('error', lang('error_page_not_found'));
redirect($this->config->item('admin_folder').'/pages');
}
@@ -74,14 +70,14 @@ function form($id = false)
$data['slug'] = $page->slug;
}
- $this->form_validation->set_rules('title', 'Title', 'trim|required');
- $this->form_validation->set_rules('menu_title', 'Menu Title', 'trim');
- $this->form_validation->set_rules('slug', 'slug', 'trim');
- $this->form_validation->set_rules('seo_title', 'SEO Title', 'trim');
- $this->form_validation->set_rules('meta', 'Meta', 'trim');
- $this->form_validation->set_rules('sequence', 'sequence', 'trim|integer');
- $this->form_validation->set_rules('parent_id', 'parent_id', 'trim|integer');
- $this->form_validation->set_rules('content', 'Content', 'trim');
+ $this->form_validation->set_rules('title', 'lang:title', 'trim|required');
+ $this->form_validation->set_rules('menu_title', 'lang:menu_title', 'trim');
+ $this->form_validation->set_rules('slug', 'lang:slug', 'trim');
+ $this->form_validation->set_rules('seo_title', 'lang:seo_title', 'trim');
+ $this->form_validation->set_rules('meta', 'lang:meta', 'trim');
+ $this->form_validation->set_rules('sequence', 'lang:sequence', 'trim|integer');
+ $this->form_validation->set_rules('parent_id', 'lang:parent_id', 'trim|integer');
+ $this->form_validation->set_rules('content', 'lang:content', 'trim');
// Validate the form
if($this->form_validation->run() == false)
@@ -90,6 +86,8 @@ function form($id = false)
}
else
{
+ $this->load->helper('text');
+
//first check the slug field
$slug = $this->input->post('slug');
@@ -99,7 +97,7 @@ function form($id = false)
$slug = $this->input->post('title');
}
- $slug = url_title($slug, 'dash', TRUE);
+ $slug = url_title(convert_accented_characters($slug), 'dash', TRUE);
//validate the slug
$this->load->model('Routes_model');
@@ -144,15 +142,7 @@ function form($id = false)
$this->Routes_model->save($route);
- //set the message accordingly
- if (!$id)
- {
- $this->session->set_flashdata('message', 'The "'.$this->input->post('title').'" page has been added.');
- }
- else
- {
- $this->session->set_flashdata('message', 'Information for the "'.$this->input->post('title').'" page has been updated.');
- }
+ $this->session->set_flashdata('message', lang('message_saved_page'));
//go back to the page list
redirect($this->config->item('admin_folder').'/pages');
@@ -175,19 +165,16 @@ function link_form($id = false)
$data['parent_id'] = 0;
- $data['page_title'] = 'Add Link';
+ $data['page_title'] = lang('link_form');
$data['pages'] = $this->Page_model->get_pages();
if($id)
{
- //set the page title to edit page
- $data['page_title'] = 'Edit Link';
-
$page = $this->Page_model->get_page($id);
if(!$page)
{
//page does not exist
- $this->session->set_flashdata('message', 'The requested link could not be found.');
+ $this->session->set_flashdata('error', lang('error_link_not_found'));
redirect($this->config->item('admin_folder').'/pages');
}
@@ -201,11 +188,11 @@ function link_form($id = false)
$data['sequence'] = $page->sequence;
}
- $this->form_validation->set_rules('title', 'Title', 'trim|required');
- $this->form_validation->set_rules('url', 'URL', 'trim|required');
- $this->form_validation->set_rules('sequence', 'sequence', 'trim|integer');
- $this->form_validation->set_rules('new_window', 'New Window', 'trim|integer');
- $this->form_validation->set_rules('parent_id', 'Parent', 'trim|integer');
+ $this->form_validation->set_rules('title', 'lang:title', 'trim|required');
+ $this->form_validation->set_rules('url', 'lang:url', 'trim|required');
+ $this->form_validation->set_rules('sequence', 'lang:sequence', 'trim|integer');
+ $this->form_validation->set_rules('new_window', 'lang:new_window', 'trim|integer');
+ $this->form_validation->set_rules('parent_id', 'lang:parent_id', 'trim|integer');
// Validate the form
if($this->form_validation->run() == false)
@@ -226,15 +213,7 @@ function link_form($id = false)
//save the page
$this->Page_model->save($save);
- //set the message accordingly
- if (!$id)
- {
- $this->session->set_flashdata('message', 'The "'.$this->input->post('title').'" link has been added.');
- }
- else
- {
- $this->session->set_flashdata('message', 'Information for the "'.$this->input->post('title').'" link has been updated.');
- }
+ $this->session->set_flashdata('message', lang('message_saved_link'));
//go back to the page list
redirect($this->config->item('admin_folder').'/pages');
@@ -255,11 +234,11 @@ function delete($id)
$this->Routes_model->delete($page->route_id);
$this->Page_model->delete_page($id);
- $this->session->set_flashdata('message', 'The page has been deleted.');
+ $this->session->set_flashdata('message', lang('message_deleted_page'));
}
else
{
- $this->session->set_flashdata('error', 'The requested page could not be found.');
+ $this->session->set_flashdata('error', lang('error_page_not_found'));
}
redirect($this->config->item('admin_folder').'/pages');
diff --git a/gocart/controllers/admin/payment.php b/gocart/controllers/admin/payment.php
index ec580270..2fa18d88 100644
--- a/gocart/controllers/admin/payment.php
+++ b/gocart/controllers/admin/payment.php
@@ -1,18 +1,17 @@
load->library('Auth');
+
$this->auth->check_access('Admin', true);
$this->load->model('Settings_model');
- //this adds the redirect url to our flash data, incase they are not logged in
- $this->auth->is_logged_in(uri_string());
+
+ $this->lang->load('settings');
}
function index()
@@ -22,9 +21,11 @@ function index()
function install($module)
{
+ $this->load->add_package_path(APPPATH.'packages/payment/'.$module.'/');
+
$enabled_modules = $this->Settings_model->get_settings('payment_modules');
- $this->load->library('payment/'.$module.'/'.$module);
+ $this->load->library($module);
if(!array_key_exists($module, $enabled_modules))
{
@@ -49,7 +50,10 @@ function uninstall($module)
function settings($module)
{
- $this->load->library('payment/'.$module.'/'.$module);
+ $this->load->add_package_path(APPPATH.'packages/payment/'.$module.'/');
+ $this->load->library($module);
+ $this->load->helper('form');
+
//ok, in order for the most flexibility, and in case someone wants to use javascript or something
//the form gets pulled directly from the library.
@@ -58,7 +62,7 @@ function settings($module)
$check = $this->$module->check();
if(!$check)
{
- $this->session->set_flashdata('message', $module.' settings have been updated');
+ $this->session->set_flashdata('message', sprintf(lang('settings_updated'), $module));
redirect($this->config->item('admin_folder').'/payment');
}
else
@@ -78,7 +82,7 @@ function settings($module)
$data['form'] = $this->$module->form();
}
$data['module'] = $module;
- $data['page_title'] = '"'.$module.'" Payment Settings';
+ $data['page_title'] = sprintf(lang('payment_settings'), $module);
$this->load->view($this->config->item('admin_folder').'/payment_module_settings', $data);
}
}
diff --git a/gocart/controllers/admin/products.php b/gocart/controllers/admin/products.php
index ec31e9db..46d28206 100644
--- a/gocart/controllers/admin/products.php
+++ b/gocart/controllers/admin/products.php
@@ -1,39 +1,133 @@
load->library('Auth');
+
$this->auth->check_access('Admin', true);
- //this adds the redirect url to our flash data, incase they are not logged in
- $this->auth->is_logged_in(uri_string());
$this->load->model('Product_model');
$this->load->helper('form');
+ $this->lang->load('product');
}
- function index()
+ function index($order_by="name", $sort_order="ASC", $code=0, $page=0, $rows=15)
{
- $data['page_title'] = 'Products';
- $data['products'] = $this->Product_model->get_products();
+
+ $data['page_title'] = lang('products');
+
+ $data['code'] = $code;
+ $term = false;
+ $category_id = false;
+
+ //get the category list for the drop menu
+ $data['categories'] = $this->Category_model->get_categories_tierd();
+
+ $post = $this->input->post(null, false);
+ $this->load->model('Search_model');
+ if($post)
+ {
+ $term = json_encode($post);
+ $code = $this->Search_model->record_term($term);
+ $data['code'] = $code;
+ }
+ elseif ($code)
+ {
+ $term = $this->Search_model->get_term($code);
+ }
+
+ //store the search term
+ $data['term'] = $term;
+ $data['order_by'] = $order_by;
+ $data['sort_order'] = $sort_order;
+
+ $data['products'] = $this->Product_model->products(array('term'=>$term, 'order_by'=>$order_by, 'sort_order'=>$sort_order, 'rows'=>$rows, 'page'=>$page));
+
+ //total number of products
+ $data['total'] = $this->Product_model->products(array('term'=>$term, 'order_by'=>$order_by, 'sort_order'=>$sort_order), true);
+
+ $this->load->library('pagination');
+
+ $config['base_url'] = site_url($this->config->item('admin_folder').'/products/index/'.$order_by.'/'.$sort_order.'/'.$code.'/');
+ $config['total_rows'] = $data['total'];
+ $config['per_page'] = $rows;
+ $config['uri_segment'] = 7;
+ $config['first_link'] = 'First';
+ $config['first_tag_open'] = '';
+ $config['first_tag_close'] = '';
+ $config['last_link'] = 'Last';
+ $config['last_tag_open'] = '';
+ $config['last_tag_close'] = '';
+
+ $config['full_tag_open'] = '';
+ $config['cur_tag_open'] = '';
+ $config['cur_tag_close'] = '';
+
+ $config['num_tag_open'] = '';
+ $config['num_tag_close'] = '';
+
+ $config['prev_link'] = '«';
+ $config['prev_tag_open'] = '';
+ $config['prev_tag_close'] = '';
+
+ $config['next_link'] = '»';
+ $config['next_tag_open'] = '';
+ $config['next_tag_close'] = '';
+
+ $this->pagination->initialize($config);
+
$this->load->view($this->config->item('admin_folder').'/products', $data);
}
+ //basic category search
+ function product_autocomplete()
+ {
+ $name = trim($this->input->post('name'));
+ $limit = $this->input->post('limit');
+
+ if(empty($name))
+ {
+ echo json_encode(array());
+ }
+ else
+ {
+ $results = $this->Product_model->product_autocomplete($name, $limit);
+
+ $return = array();
+
+ foreach($results as $r)
+ {
+ $return[$r->id] = $r->name;
+ }
+ echo json_encode($return);
+ }
+
+ }
+
function bulk_save()
{
$products = $this->input->post('product');
+ if(!$products)
+ {
+ $this->session->set_flashdata('error', lang('error_bulk_no_products'));
+ redirect($this->config->item('admin_folder').'/products');
+ }
+
foreach($products as $id=>$product)
{
$product['id'] = $id;
$this->Product_model->save($product);
}
- $this->session->set_flashdata('message', 'Your products have been updated');
+ $this->session->set_flashdata('message', lang('message_bulk_update'));
redirect($this->config->item('admin_folder').'/products');
}
@@ -41,13 +135,15 @@ function form($id = false, $duplicate = false)
{
$this->product_id = $id;
$this->load->library('form_validation');
- $this->load->model(array('Option_model', 'Category_model'));
+ $this->load->model(array('Option_model', 'Category_model', 'Digital_Product_model'));
+ $this->lang->load('digital_product');
$this->form_validation->set_error_delimiters('', '
');
- $data['categories'] = $this->Category_model->get_categories_tierd();
- $data['product_list'] = $this->Product_model->get_products();
+ //$data['categories'] = $this->Category_model->get_categories_tierd();
+ //$data['product_list'] = $this->Product_model->get_products();
+ $data['file_list'] = $this->Digital_Product_model->get_list();
- $data['page_title'] = 'Add Product';
+ $data['page_title'] = lang('product_form');
//default values are empty if the product is new
$data['id'] = '';
@@ -59,38 +155,45 @@ function form($id = false, $duplicate = false)
$data['price'] = '';
$data['saleprice'] = '';
$data['weight'] = '';
- $data['in_stock'] = '';
+ $data['track_stock'] = '';
$data['seo_title'] = '';
$data['meta'] = '';
+ $data['shippable'] = '';
+ $data['taxable'] = '';
+ $data['fixed_quantity'] = '';
+ $data['quantity'] = '';
+ $data['enabled'] = '';
$data['related_products'] = array();
$data['product_categories'] = array();
$data['images'] = array();
+ $data['product_files'] = array();
//create the photos array for later use
$data['photos'] = array();
if ($id)
{
+ // get the existing file associations and create a format we can read from the form to set the checkboxes
+ $pr_files = $this->Digital_Product_model->get_associations_by_product($id);
+ foreach($pr_files as $f)
+ {
+ $data['product_files'][] = $f->file_id;
+ }
+
+ // get product & options data
$data['product_options'] = $this->Option_model->get_product_options($id);
$product = $this->Product_model->get_product($id);
-
+
//if the product does not exist, redirect them to the product list with an error
if (!$product)
{
- $this->session->set_flashdata('error', 'The requested product could not be found.');
+ $this->session->set_flashdata('error', lang('error_not_found'));
redirect($this->config->item('admin_folder').'/products');
}
-
+
//helps us with the slug generation
$this->product_name = $this->input->post('slug', $product->slug);
-
- //if we're duplicating the product, then this should not be set
- if(!$duplicate)
- {
- $data['page_title'] = 'Edit Product';
- }
-
//set values to db values
$data['id'] = $id;
$data['sku'] = $product->sku;
@@ -103,13 +206,18 @@ function form($id = false, $duplicate = false)
$data['price'] = $product->price;
$data['saleprice'] = $product->saleprice;
$data['weight'] = $product->weight;
- $data['in_stock'] = $product->in_stock;
+ $data['track_stock'] = $product->track_stock;
+ $data['shippable'] = $product->shippable;
+ $data['quantity'] = $product->quantity;
+ $data['taxable'] = $product->taxable;
+ $data['fixed_quantity'] = $product->fixed_quantity;
+ $data['enabled'] = $product->enabled;
//make sure we haven't submitted the form yet before we pull in the images/related products from the database
if(!$this->input->post('submit'))
{
$data['product_categories'] = $product->categories;
- $data['related_products'] = json_decode($product->related_products);
+ $data['related_products'] = $product->related_products;
$data['images'] = (array)json_decode($product->images);
}
}
@@ -128,17 +236,22 @@ function form($id = false, $duplicate = false)
$this->form_validation->set_rules('caption', 'Caption');
$this->form_validation->set_rules('primary_photo', 'Primary');
- $this->form_validation->set_rules('sku', 'SKU', 'trim');
- $this->form_validation->set_rules('seo_title', 'SEO Title', 'trim');
- $this->form_validation->set_rules('meta', 'Meta Data', 'trim');
- $this->form_validation->set_rules('name', 'Name', 'trim|required|max_length[64]');
- $this->form_validation->set_rules('slug', 'slug', 'trim');
- $this->form_validation->set_rules('description', 'Description', 'trim');
- $this->form_validation->set_rules('excerpt', 'Excerpt', 'trim');
- $this->form_validation->set_rules('price', 'Price', 'trim|numeric');
- $this->form_validation->set_rules('saleprice', 'Sale Price', 'trim|numeric');
- $this->form_validation->set_rules('weight', 'Weight', 'trim|numeric');
- $this->form_validation->set_rules('in_stock', 'In Stock', 'trim|numeric');
+ $this->form_validation->set_rules('sku', 'lang:sku', 'trim');
+ $this->form_validation->set_rules('seo_title', 'lang:seo_title', 'trim');
+ $this->form_validation->set_rules('meta', 'lang:meta_data', 'trim');
+ $this->form_validation->set_rules('name', 'lang:name', 'trim|required|max_length[64]');
+ $this->form_validation->set_rules('slug', 'lang:slug', 'trim');
+ $this->form_validation->set_rules('description', 'lang:description', 'trim');
+ $this->form_validation->set_rules('excerpt', 'lang:excerpt', 'trim');
+ $this->form_validation->set_rules('price', 'lang:price', 'trim|numeric|floatval');
+ $this->form_validation->set_rules('saleprice', 'lang:saleprice', 'trim|numeric|floatval');
+ $this->form_validation->set_rules('weight', 'lang:weight', 'trim|numeric|floatval');
+ $this->form_validation->set_rules('track_stock', 'lang:track_stock', 'trim|numeric');
+ $this->form_validation->set_rules('quantity', 'lang:quantity', 'trim|numeric');
+ $this->form_validation->set_rules('shippable', 'lang:shippable', 'trim|numeric');
+ $this->form_validation->set_rules('taxable', 'lang:taxable', 'trim|numeric');
+ $this->form_validation->set_rules('fixed_quantity', 'lang:fixed_quantity', 'trim|numeric');
+ $this->form_validation->set_rules('enabled', 'lang:enabled', 'trim|numeric');
/*
if we've posted already, get the photo stuff and organize it
@@ -159,6 +272,8 @@ function form($id = false, $duplicate = false)
$data['related_products'] = $this->input->post('related_products');
$data['product_categories'] = $this->input->post('categories');
$data['images'] = $this->input->post('images');
+ $data['product_files'] = $this->input->post('downloads');
+
}
if ($this->form_validation->run() == FALSE)
@@ -167,6 +282,8 @@ function form($id = false, $duplicate = false)
}
else
{
+ $this->load->helper('text');
+
//first check the slug field
$slug = $this->input->post('slug');
@@ -176,7 +293,7 @@ function form($id = false, $duplicate = false)
$slug = $this->input->post('name');
}
- $slug = url_title($slug, 'dash', TRUE);
+ $slug = url_title(convert_accented_characters($slug), 'dash', TRUE);
//validate the slug
$this->load->model('Routes_model');
@@ -204,7 +321,12 @@ function form($id = false, $duplicate = false)
$save['price'] = $this->input->post('price');
$save['saleprice'] = $this->input->post('saleprice');
$save['weight'] = $this->input->post('weight');
- $save['in_stock'] = $this->input->post('in_stock');
+ $save['track_stock'] = $this->input->post('track_stock');
+ $save['fixed_quantity'] = $this->input->post('fixed_quantity');
+ $save['quantity'] = $this->input->post('quantity');
+ $save['shippable'] = $this->input->post('shippable');
+ $save['taxable'] = $this->input->post('taxable');
+ $save['enabled'] = $this->input->post('enabled');
$post_images = $this->input->post('images');
$save['slug'] = $slug;
@@ -240,8 +362,12 @@ function form($id = false, $duplicate = false)
//save categories
$categories = $this->input->post('categories');
+ if(!$categories)
+ {
+ $categories = array();
+ }
-
+ // format options
$options = array();
if($this->input->post('option'))
{
@@ -251,8 +377,22 @@ function form($id = false, $duplicate = false)
}
}
-
+
+ // save product
$product_id = $this->Product_model->save($save, $options, $categories);
+
+ // add file associations
+ // clear existsing
+ $this->Digital_Product_model->disassociate(false, $product_id);
+ // save new
+ $downloads = $this->input->post('downloads');
+ if(is_array($downloads))
+ {
+ foreach($downloads as $d)
+ {
+ $this->Digital_Product_model->associate($d, $product_id);
+ }
+ }
//save the route
$route['id'] = $route_id;
@@ -261,14 +401,7 @@ function form($id = false, $duplicate = false)
$this->Routes_model->save($route);
- if (!$id)
- {
- $this->session->set_flashdata('message', 'The "'.$this->input->post('name').'" product has been added.');
- }
- else
- {
- $this->session->set_flashdata('message', 'Information for the "'.$this->input->post('name').'" product has been updated.');
- }
+ $this->session->set_flashdata('message', lang('message_saved_product'));
//go back to the product list
redirect($this->config->item('admin_folder').'/products');
@@ -288,7 +421,7 @@ function product_image_upload()
$data['error'] = false;
$config['allowed_types'] = 'gif|jpg|png';
- $config['max_size'] = $this->config->item('size_limit');
+ //$config['max_size'] = $this->config->item('size_limit');
$config['upload_path'] = 'uploads/images/full';
$config['encrypt_name'] = true;
$config['remove_spaces'] = true;
@@ -303,13 +436,13 @@ function product_image_upload()
/*
I find that ImageMagick is more efficient that GD2 but not everyone has it
- if your server has ImageMagick then change out the line
+ if your server has ImageMagick then you can change out the line
$config['image_library'] = 'gd2';
with
- $config['library_path'] = '/usr/bin/convert';
+ $config['library_path'] = '/usr/bin/convert'; //make sure you use the correct path to ImageMagic
$config['image_library'] = 'ImageMagick';
*/
@@ -364,7 +497,7 @@ function delete($id = false)
//if the product does not exist, redirect them to the customer list with an error
if (!$product)
{
- $this->session->set_flashdata('message', 'The requested product could not be found.');
+ $this->session->set_flashdata('error', lang('error_not_found'));
redirect($this->config->item('admin_folder').'/products');
}
else
@@ -375,17 +508,17 @@ function delete($id = false)
$this->Routes_model->remove('('.$product->slug.')');
//if the product is legit, delete them
- $delete = $this->Product_model->delete_product($id);
+ $this->Product_model->delete_product($id);
- $this->session->set_flashdata('message', 'The "'.$product->name.'" product has been deleted from the system.');
+ $this->session->set_flashdata('message', lang('message_deleted_product'));
redirect($this->config->item('admin_folder').'/products');
}
}
else
{
//if they do not provide an id send them to the product list page with an error
- $this->session->set_flashdata('message', 'The requested product could not be found.');
+ $this->session->set_flashdata('error', lang('error_not_found'));
redirect($this->config->item('admin_folder').'/products');
}
}
-}
\ No newline at end of file
+}
diff --git a/gocart/controllers/admin/reports.php b/gocart/controllers/admin/reports.php
index 8d002691..224f48b5 100644
--- a/gocart/controllers/admin/reports.php
+++ b/gocart/controllers/admin/reports.php
@@ -1,6 +1,6 @@
load->library('Auth');
+
$this->auth->check_access('Admin', true);
- //this adds the redirect url to our flash data, incase they are not logged in
- $this->auth->is_logged_in(uri_string());
$this->load->model('Order_model');
$this->load->model('Search_model');
- $this->load->helper(array('formatting', 'utility'));
+ $this->load->helper(array('formatting'));
+
+ $this->lang->load('report');
}
function index()
{
-
- $orders = $this->Order_model->get_orders();
- foreach($orders as &$o)
- {
- $data['orders'][] = $this->Order_model->get_items($o->id);
- }
- $data['page_title'] = 'Reports';
+ $data['page_title'] = lang('reports');
+ $data['years'] = $this->Order_model->get_sales_years();
$this->load->view($this->config->item('admin_folder').'/reports', $data);
}
@@ -42,82 +37,8 @@ function best_sellers()
function sales()
{
- $bulk_orders = $this->Order_model->get_orders();
-
- $orders = array();
-
- foreach($bulk_orders as $o)
- {
- // omit orders with a blank date
- if($o->ordered_on=='0000-00-00 00:00:00')
- {
- continue;
- }
-
-
- $date = explode('-', $o->ordered_on);
- $y = $date[0];
- $m = $date[1];
- if(!isset($orders[$y]))
- {
- $orders[$y] = array();
- }
-
- if(!isset($orders[$y][$m]))
- {
- $orders[$y][$m] = array();
- }
-
- //coupon discounts
- if(!isset($orders[$y][$m]['coupon_discounts']))
- {
- $orders[$y][$m]['coupon_discounts'] = 0;
- }
- $orders[$y][$m]['coupon_discounts'] += $o->coupon_discount;
-
- //gift card discounts
- if(!isset($orders[$y][$m]['gift_card_discounts']))
- {
- $orders[$y][$m]['gift_card_discounts'] = 0;
- }
- $orders[$y][$m]['gift_card_discounts'] += $o->gift_card_discount;
-
- //total of product sales
- if(!isset($orders[$y][$m]['product_totals']))
- {
- $orders[$y][$m]['product_totals'] = 0;
- }
- $orders[$y][$m]['product_totals'] += $o->subtotal;
-
- //total of Shipping
- if(!isset($orders[$y][$m]['shipping']))
- {
- $orders[$y][$m]['shipping'] = 0;
- }
- $orders[$y][$m]['shipping'] += $o->shipping;
-
- //total taxes
- if(!isset($orders[$y][$m]['tax']))
- {
- $orders[$y][$m]['tax'] = 0;
- }
- $orders[$y][$m]['tax'] += $o->tax;
-
- //Grand Total less discounts
- if(!isset($orders[$y][$m]['total']))
- {
- $orders[$y][$m]['total'] = 0;
- }
- $orders[$y][$m]['total'] += $o->total;
- }
-
- krsort($orders);
- foreach($orders as &$order)
- {
- krsort($order);
- }
-
- $data['orders'] = $orders;
+ $year = $this->input->post('year');
+ $data['orders'] = $this->Order_model->get_gross_monthly_sales($year);
$this->load->view($this->config->item('admin_folder').'/reports/sales', $data);
}
diff --git a/gocart/controllers/admin/settings.php b/gocart/controllers/admin/settings.php
index 9a2d0e91..220c2d2e 100644
--- a/gocart/controllers/admin/settings.php
+++ b/gocart/controllers/admin/settings.php
@@ -1,18 +1,16 @@
load->library('Auth');
+
$this->auth->check_access('Admin', true);
$this->load->model('Settings_model');
$this->load->model('Messages_model');
-
- //this adds the redirect url to our flash data, incase they are not logged in
- $this->auth->is_logged_in(uri_string());
+ $this->lang->load('settings');
}
function index()
@@ -25,7 +23,7 @@ function index()
$data['payment_modules'] = array();
//create a list of available payment modules
- if ($handle = opendir(APPPATH.'/libraries/payment/')) {
+ if ($handle = opendir(APPPATH.'packages/payment/')) {
while (false !== ($file = readdir($handle)))
{
//now we eliminate the periods from the list.
@@ -50,7 +48,7 @@ function index()
$data['shipping_modules'] = array();
//create a list of available shipping modules
- if ($handle = opendir(APPPATH.'/libraries/shipping/')) {
+ if ($handle = opendir(APPPATH.'packages/shipping/')) {
while (false !== ($file = readdir($handle)))
{
//now we eliminate anything with periods
@@ -72,13 +70,13 @@ function index()
$data['canned_messages'] = $this->Messages_model->get_list();
- $data['page_title'] = 'Settings';
+ $data['page_title'] = lang('settings');
$this->load->view($this->config->item('admin_folder').'/settings', $data);
}
function canned_message_form($id=false)
{
- $data['page_title'] = 'Add Canned Message';
+ $data['page_title'] = lang('canned_message_form');
$data['id'] = $id;
$data['name'] = '';
@@ -88,7 +86,6 @@ function canned_message_form($id=false)
if($id)
{
- $data['page_title'] = 'Edit Canned Message';
$message = $this->Messages_model->get_message($id);
$data['name'] = $message['name'];
@@ -100,9 +97,9 @@ function canned_message_form($id=false)
$this->load->helper('form');
$this->load->library('form_validation');
- $this->form_validation->set_rules('name', 'Message name', 'trim|required|max_length[50]');
- $this->form_validation->set_rules('subject', 'Subject', 'trim|required|max_length[100]');
- $this->form_validation->set_rules('content', 'Message Content', 'trim|required');
+ $this->form_validation->set_rules('name', 'lang:message_name', 'trim|required|max_length[50]');
+ $this->form_validation->set_rules('subject', 'lang:subject', 'trim|required|max_length[100]');
+ $this->form_validation->set_rules('content', 'lang:message_content', 'trim|required');
if ($this->form_validation->run() == FALSE)
{
@@ -118,9 +115,14 @@ function canned_message_form($id=false)
$save['subject'] = $this->input->post('subject');
$save['content'] = $this->input->post('content');
+ //all created messages are typed to order so admins can send them from the view order page.
+ if($data['deletable'])
+ {
+ $save['type'] = 'order';
+ }
$this->Messages_model->save_message($save);
- $this->session->set_flashdata('message', 'Your message has been saved.');
+ $this->session->set_flashdata('message', lang('message_saved_message'));
redirect($this->config->item('admin_folder').'/settings');
}
}
@@ -128,6 +130,8 @@ function canned_message_form($id=false)
function delete_message($id)
{
$this->Messages_model->delete_message($id);
+
+ $this->session->set_flashdata('message', lang('message_deleted_message'));
redirect($this->config->item('admin_folder').'/settings');
}
}
\ No newline at end of file
diff --git a/gocart/controllers/admin/shipping.php b/gocart/controllers/admin/shipping.php
index 0be2a05c..4c5cc0b9 100644
--- a/gocart/controllers/admin/shipping.php
+++ b/gocart/controllers/admin/shipping.php
@@ -1,17 +1,15 @@
load->library('Auth');
+
$this->auth->check_access('Admin', true);
- //$this->load->helper('Shipping');
$this->load->model('Settings_model');
- //this adds the redirect url to our flash data, incase they are not logged in
- $this->auth->is_logged_in(uri_string());
+ $this->lang->load('settings');
}
function index()
@@ -21,9 +19,11 @@ function index()
function install($module)
{
- $enabled_modules = $this->Settings_model->get_settings('shipping_modules');
+ //setup the third_party package
+ $this->load->add_package_path(APPPATH.'packages/shipping/'.$module.'/');
+ $this->load->library($module);
- $this->load->library('shipping/'.$module.'/'.$module);
+ $enabled_modules = $this->Settings_model->get_settings('shipping_modules');
if(!array_key_exists($module, $enabled_modules))
{
@@ -48,7 +48,10 @@ function uninstall($module)
function settings($module)
{
- $this->load->library('shipping/'.$module.'/'.$module);
+ $this->load->helper('form');
+ $this->load->add_package_path(APPPATH.'packages/shipping/'.$module.'/');
+ $this->load->library($module);
+
//ok, in order for the most flexibility, and in case someone wants to use javascript or something
//the form gets pulled directly from the library.
@@ -57,7 +60,7 @@ function settings($module)
$check = $this->$module->check();
if(!$check)
{
- $this->session->set_flashdata('message', $module.' settings have been updated');
+ $this->session->set_flashdata('message', sprintf(lang('settings_updated'), $module));
redirect($this->config->item('admin_folder').'/shipping');
}
else
@@ -77,7 +80,7 @@ function settings($module)
$data['form'] = $this->$module->form();
}
$data['module'] = $module;
- $data['page_title'] = '"'.$module.'" Shipping Settings';
+ $data['page_title'] = sprintf(lang('shipping_settings'), $module);
$this->load->view($this->config->item('admin_folder').'/shipping_module_settings', $data);
}
}
diff --git a/gocart/controllers/cart.php b/gocart/controllers/cart.php
old mode 100755
new mode 100644
index 2a5ab5ec..1a8ded3a
--- a/gocart/controllers/cart.php
+++ b/gocart/controllers/cart.php
@@ -1,19 +1,6 @@
load->library('Go_cart');
- $this->load->model(array('Page_model', 'Product_model', 'Gift_card_model', 'Option_model', 'Order_model', 'Settings_model'));
- $this->load->helper(array('form_helper', 'formatting_helper'));
-
- //fill in our variables
- $this->categories = $this->Category_model->get_categories_tierd(0);
- $this->pages = $this->Page_model->get_pages();
-
- // check if giftcards are enabled
- $gc_setting = $this->Settings_model->get_settings('gift_cards');
- if(!empty($gc_setting['enabled']) && $gc_setting['enabled']==1)
- {
- $this->gift_cards_enabled = true;
- }
- else
- {
- $this->gift_cards_enabled = false;
- }
-
}
function index()
@@ -56,16 +23,23 @@ function index()
$this->load->view('homepage', $data);
}
- function page($id)
+ function page($id = false)
{
+ //if there is no page id provided redirect to the homepage.
+ $data['page'] = $this->Page_model->get_page($id);
+ if(!$data['page'])
+ {
+ show_404();
+ }
$this->load->model('Page_model');
- $data['page'] = $this->Page_model->get_page($id);
+ $data['base_url'] = $this->uri->segment_array();
+
$data['fb_like'] = true;
$data['page_title'] = $data['page']->title;
$data['meta'] = $data['page']->meta;
- $data['seo_title'] = $data['page']->seo_title;
+ $data['seo_title'] = (!empty($data['page']->seo_title))?$data['page']->seo_title:$data['page']->title;
$data['gift_cards_enabled'] = $this->gift_cards_enabled;
@@ -75,20 +49,53 @@ function page($id)
function search($code=false, $page = 0)
{
$this->load->model('Search_model');
- $data['page_title'] = 'Search';
- $data['gift_cards_enabled'] = $this->gift_cards_enabled;
+
//check to see if we have a search term
if(!$code)
{
//if the term is in post, save it to the db and give me a reference
- $term = $this->input->post('term');
+ $term = $this->input->post('term', true);
$code = $this->Search_model->record_term($term);
+
+ // no code? redirect so we can have the code in place for the sorting.
+ // I know this isn't the best way...
+ redirect('cart/search/'.$code.'/'.$page);
}
else
{
//if we have the md5 string, get the term
$term = $this->Search_model->get_term($code);
}
+
+ if(empty($term))
+ {
+ //if there is still no search term throw an error
+ //if there is still no search term throw an error
+ $this->session->set_flashdata('error', lang('search_error'));
+ redirect('cart');
+ }
+ $data['page_title'] = lang('search');
+ $data['gift_cards_enabled'] = $this->gift_cards_enabled;
+
+ //fix for the category view page.
+ $data['base_url'] = array();
+
+ $sort_array = array(
+ 'name/asc' => array('by' => 'name', 'sort'=>'ASC'),
+ 'name/desc' => array('by' => 'name', 'sort'=>'DESC'),
+ 'price/asc' => array('by' => 'price', 'sort'=>'ASC'),
+ 'price/desc' => array('by' => 'price', 'sort'=>'DESC'),
+ );
+ $sort_by = array('by'=>false, 'sort'=>false);
+
+ if(isset($_GET['by']))
+ {
+ if(isset($sort_array[$_GET['by']]))
+ {
+ $sort_by = $sort_array[$_GET['by']];
+ }
+ }
+
if(empty($term))
{
@@ -98,7 +105,7 @@ function search($code=false, $page = 0)
else
{
- $data['page_title'] = 'Search';
+ $data['page_title'] = lang('search');
$data['gift_cards_enabled'] = $this->gift_cards_enabled;
//set up pagination
@@ -106,8 +113,31 @@ function search($code=false, $page = 0)
$config['base_url'] = base_url().'cart/search/'.$code.'/';
$config['uri_segment'] = 4;
$config['per_page'] = 20;
-
- $result = $this->Product_model->search_products($term, $config['per_page'], $page);
+
+ $config['first_link'] = 'First';
+ $config['first_tag_open'] = '';
+ $config['first_tag_close'] = '';
+ $config['last_link'] = 'Last';
+ $config['last_tag_open'] = '';
+ $config['last_tag_close'] = '';
+
+ $config['full_tag_open'] = '';
+ $config['cur_tag_open'] = '';
+ $config['cur_tag_close'] = '';
+
+ $config['num_tag_open'] = '';
+ $config['num_tag_close'] = '';
+
+ $config['prev_link'] = '«';
+ $config['prev_tag_open'] = '';
+ $config['prev_tag_close'] = '';
+
+ $config['next_link'] = '»';
+ $config['next_tag_open'] = '';
+ $config['next_tag_close'] = '';
+
+ $result = $this->Product_model->search_products($term, $config['per_page'], $page, $sort_by['by'], $sort_by['sort']);
$config['total_rows'] = $result['count'];
$this->pagination->initialize($config);
@@ -121,9 +151,8 @@ function search($code=false, $page = 0)
}
}
- function category($id, $page=0)
+ function category($id)
{
-
//get the category
$data['category'] = $this->Category_model->get_category($id);
@@ -132,24 +161,82 @@ function category($id, $page=0)
show_404();
}
+ //set up pagination
+ $segments = $this->uri->total_segments();
+ $base_url = $this->uri->segment_array();
+
+ if($data['category']->slug == $base_url[count($base_url)])
+ {
+ $page = 0;
+ $segments++;
+ }
+ else
+ {
+ $page = array_splice($base_url, -1, 1);
+ $page = $page[0];
+ }
+
+ $data['base_url'] = $base_url;
+ $base_url = implode('/', $base_url);
+
$data['subcategories'] = $this->Category_model->get_categories($data['category']->id);
$data['product_columns'] = $this->config->item('product_columns');
$data['gift_cards_enabled'] = $this->gift_cards_enabled;
$data['meta'] = $data['category']->meta;
- $data['seo_title'] = $data['category']->seo_title;
-
+ $data['seo_title'] = (!empty($data['category']->seo_title))?$data['category']->seo_title:$data['category']->name;
$data['page_title'] = $data['category']->name;
+
+ $sort_array = array(
+ 'name/asc' => array('by' => 'products.name', 'sort'=>'ASC'),
+ 'name/desc' => array('by' => 'products.name', 'sort'=>'DESC'),
+ 'price/asc' => array('by' => 'products.price', 'sort'=>'ASC'),
+ 'price/desc' => array('by' => 'products.price', 'sort'=>'DESC'),
+ );
+ $sort_by = array('by'=>'sequence', 'sort'=>'ASC');
+
+ if(isset($_GET['by']))
+ {
+ if(isset($sort_array[$_GET['by']]))
+ {
+ $sort_by = $sort_array[$_GET['by']];
+ }
+ }
+
//set up pagination
$this->load->library('pagination');
- $config['base_url'] = base_url().$data['category']->slug.'/';
- $config['uri_segment'] = 2;
- $config['per_page'] = 20;
+ $config['base_url'] = site_url($base_url);
+ $config['uri_segment'] = $segments;
+ $config['per_page'] = 24;
$config['total_rows'] = $this->Product_model->count_products($data['category']->id);
+
+ $config['first_link'] = 'First';
+ $config['first_tag_open'] = '';
+ $config['first_tag_close'] = '';
+ $config['last_link'] = 'Last';
+ $config['last_tag_open'] = '';
+ $config['last_tag_close'] = '';
+
+ $config['full_tag_open'] = '';
+ $config['cur_tag_open'] = '';
+ $config['cur_tag_close'] = '';
+
+ $config['num_tag_open'] = '';
+ $config['num_tag_close'] = '';
+
+ $config['prev_link'] = '«';
+ $config['prev_tag_open'] = '';
+ $config['prev_tag_close'] = '';
+
+ $config['next_link'] = '»';
+ $config['next_tag_open'] = '';
+ $config['next_tag_close'] = '';
+
$this->pagination->initialize($config);
//grab the products using the pagination lib
- $data['products'] = $this->Product_model->get_products($data['category']->id, $config['per_page'], $page);
+ $data['products'] = $this->Product_model->get_products($data['category']->id, $config['per_page'], $page, $sort_by['by'], $sort_by['sort']);
foreach ($data['products'] as &$p)
{
$p->images = (array)json_decode($p->images);
@@ -164,33 +251,29 @@ function product($id)
//get the product
$data['product'] = $this->Product_model->get_product($id);
- if(!$data['product'])
+
+ if(!$data['product'] || $data['product']->enabled==0)
{
show_404();
}
-
+
+ $data['base_url'] = $this->uri->segment_array();
+
+ // load the digital language stuff
+ $this->lang->load('digital_product');
+
$data['options'] = $this->Option_model->get_product_options($data['product']->id);
-
- $related = (array)json_decode($data['product']->related_products);
+
+ $related = $data['product']->related_products;
$data['related'] = array();
- foreach($related as $r)
- {
- $r = $this->Product_model->get_product($r);
- if($r)
- {
- $r->images = (array)json_decode($r->images);
- $r->options = $this->Option_model->get_product_options($r->id);
- $data['related'][] = $r;
- }
-
- }
- $data['posted_options'] = $this->session->flashdata('option_values');
-
+
+ $data['posted_options'] = $this->session->flashdata('option_values');
+
$data['page_title'] = $data['product']->name;
$data['meta'] = $data['product']->meta;
- $data['seo_title'] = $data['product']->seo_title;
+ $data['seo_title'] = (!empty($data['product']->seo_title))?$data['product']->seo_title:$data['product']->name;
if($data['product']->images == 'false')
{
@@ -213,11 +296,37 @@ function add_to_cart()
$product_id = $this->input->post('id');
$quantity = $this->input->post('quantity');
$post_options = $this->input->post('option');
- $cartkey = $this->input->post('cartkey');
// Get a cart-ready product array
$product = $this->Product_model->get_cart_ready_product($product_id, $quantity);
+ //if out of stock purchase is disabled, check to make sure there is inventory to support the cart.
+ if(!$this->config->item('allow_os_purchase') && (bool)$product['track_stock'])
+ {
+ $stock = $this->Product_model->get_product($product_id);
+
+ //loop through the products in the cart and make sure we don't have this in there already. If we do get those quantities as well
+ $items = $this->go_cart->contents();
+ $qty_count = $quantity;
+ foreach($items as $item)
+ {
+ if(intval($item['id']) == intval($product_id))
+ {
+ $qty_count = $qty_count + $item['quantity'];
+ }
+ }
+
+ if($stock->quantity < $qty_count)
+ {
+ //we don't have this much in stock
+ $this->session->set_flashdata('error', sprintf(lang('not_enough_stock'), $stock->name, $stock->quantity));
+ $this->session->set_flashdata('quantity', $quantity);
+ $this->session->set_flashdata('option_values', $post_options);
+
+ redirect($this->Product_model->get_slug($product_id));
+ }
+ }
+
// Validate Options
// this returns a status array, with product item array automatically modified and options added
// Warning: this method receives the product by reference
@@ -226,11 +335,9 @@ function add_to_cart()
// don't add the product if we are missing required option values
if( ! $status['validated'])
{
- //if the cartkey does not exist, this will simply be blank
- $this->session->set_flashdata('cartkey', $cartkey);
$this->session->set_flashdata('quantity', $quantity);
$this->session->set_flashdata('error', $status['message']);
- $this->session->set_flashdata('option_values', $post_options);
+ $this->session->set_flashdata('option_values', $post_options);
redirect($this->Product_model->get_slug($product_id));
@@ -238,8 +345,10 @@ function add_to_cart()
//Add the original option vars to the array so we can edit it later
$product['post_options'] = $post_options;
- $product['cartkey'] = $cartkey;
-
+
+ //is giftcard
+ $product['is_gc'] = false;
+
// Add the product item to the cart, also updates coupon discounts automatically
$this->go_cart->insert($product);
@@ -257,17 +366,107 @@ function view_cart()
$this->load->view('view_cart', $data);
}
+ function remove_item($key)
+ {
+ //drop quantity to 0
+ $this->go_cart->update_cart(array($key=>0));
+
+ redirect('cart/view_cart');
+ }
+
function update_cart($redirect = false)
{
+ //if redirect isn't provided in the URL check for it in a form field
+ if(!$redirect)
+ {
+ $redirect = $this->input->post('redirect');
+ }
+
// see if we have an update for the cart
$item_keys = $this->input->post('cartkey');
$coupon_code = $this->input->post('coupon_code');
$gc_code = $this->input->post('gc_code');
+
+ //get the items in the cart and test their quantities
+ $items = $this->go_cart->contents();
+ $new_key_list = array();
+ //first find out if we're deleting any products
+ foreach($item_keys as $key=>$quantity)
+ {
+ if(intval($quantity) === 0)
+ {
+ //this item is being removed we can remove it before processing quantities.
+ //this will ensure that any items out of order will not throw errors based on the incorrect values of another item in the cart
+ $this->go_cart->update_cart(array($key=>$quantity));
+ }
+ else
+ {
+ //create a new list of relevant items
+ $new_key_list[$key] = $quantity;
+ }
+ }
+ $response = array();
+ foreach($new_key_list as $key=>$quantity)
+ {
+ $product = $this->go_cart->item($key);
+ //if out of stock purchase is disabled, check to make sure there is inventory to support the cart.
+ if(!$this->config->item('allow_os_purchase') && (bool)$product['track_stock'])
+ {
+ $stock = $this->Product_model->get_product($product['id']);
+
+ //loop through the new quantities and tabluate any products with the same product id
+ $qty_count = $quantity;
+ foreach($new_key_list as $item_key=>$item_quantity)
+ {
+ if($key != $item_key)
+ {
+ $item = $this->go_cart->item($item_key);
+ //look for other instances of the same product (this can occur if they have different options) and tabulate the total quantity
+ if($item['id'] == $stock->id)
+ {
+ $qty_count = $qty_count + $item_quantity;
+ }
+ }
+ }
+ if($stock->quantity < $qty_count)
+ {
+ if(isset($response['error']))
+ {
+ $response['error'] .= ''.sprintf(lang('not_enough_stock'), $stock->name, $stock->quantity).'
';
+ }
+ else
+ {
+ $response['error'] = ''.sprintf(lang('not_enough_stock'), $stock->name, $stock->quantity).'
';
+ }
+ }
+ else
+ {
+ //this one works, we can update it!
+ //don't update the coupons yet
+ $this->go_cart->update_cart(array($key=>$quantity));
+ }
+ }
+ else
+ {
+ $this->go_cart->update_cart(array($key=>$quantity));
+ }
+ }
+
+ //if we don't have a quantity error, run the update
+ if(!isset($response['error']))
+ {
+ //update the coupons and gift card code
+ $response = $this->go_cart->update_cart(false, $coupon_code, $gc_code);
+ // set any messages that need to be displayed
+ }
+ else
+ {
+ $response['error'] = ''.lang('error_updating_cart').'
'.$response['error'];
+ }
- $response = $this->go_cart->update_cart($item_keys, $coupon_code, $gc_code);
- // set any messages that need to be displayed
+ //check for errors again, there could have been a new error from the update cart function
if(isset($response['error']))
{
$this->session->set_flashdata('error', $response['error']);
@@ -295,7 +494,6 @@ function update_cart($redirect = false)
function giftcard()
{
-
if(!$this->gift_cards_enabled) redirect('/');
// Load giftcard settings
@@ -308,20 +506,20 @@ function giftcard()
if($data['allow_custom_amount'])
{
- $this->form_validation->set_rules('custom_amount', 'Custom Amount', 'numeric');
+ $this->form_validation->set_rules('custom_amount', 'lang:custom_amount', 'numeric');
}
- $this->form_validation->set_rules('amount', 'Amount', 'required');
- $this->form_validation->set_rules('preset_amount', 'Preset Amount', 'numeric');
- $this->form_validation->set_rules('gc_to_name', 'Recipient Name', 'trim|required');
- $this->form_validation->set_rules('gc_to_email', 'Recipient Email', 'trim|required|valid_email');
- $this->form_validation->set_rules('gc_from', 'Sender Name', 'trim|required');
- $this->form_validation->set_rules('message', 'Custom Greeting Message', 'trim|required');
+ $this->form_validation->set_rules('amount', 'lang:amount', 'required');
+ $this->form_validation->set_rules('preset_amount', 'lang:preset_amount', 'numeric');
+ $this->form_validation->set_rules('gc_to_name', 'lang:recipient_name', 'trim|required');
+ $this->form_validation->set_rules('gc_to_email', 'lang:recipient_email', 'trim|required|valid_email');
+ $this->form_validation->set_rules('gc_from', 'lang:sender_email', 'trim|required');
+ $this->form_validation->set_rules('message', 'lang:custom_greeting', 'trim|required');
if ($this->form_validation->run() == FALSE)
{
$data['error'] = validation_errors();
- $data['page_title'] = "Gift Card";
+ $data['page_title'] = lang('giftcard');
$data['gift_cards_enabled'] = $this->gift_cards_enabled;
$this->load->view('giftcards', $data);
}
@@ -332,17 +530,19 @@ function giftcard()
$card['price'] = set_value(set_value('amount'));
- $card['id'] = -1; // just a placeholder
- $card['sku'] = 'GiftCard';
- $card['base_price'] = $card['price']; // price gets modified by options, show the baseline still...
- $card['name'] = 'Gift Card';
- $card['code'] = $this->Gift_card_model->generate_password();
- $card['excerpt'] = 'Gift Card for a Friend
To: '.set_value('gc_to_name');
- $card['weight'] = 0;
- $card['no_quantity'] = true; // prevent quantity change.. since it wouldn't make sense
- $card['quantity'] = 1;
- $card['shippable'] = false;
- $card['is_gc'] = true; // !Important
+ $card['id'] = -1; // just a placeholder
+ $card['sku'] = lang('giftcard');
+ $card['base_price'] = $card['price']; // price gets modified by options, show the baseline still...
+ $card['name'] = lang('giftcard');
+ $card['code'] = generate_code(); // from the string helper
+ $card['excerpt'] = sprintf(lang('giftcard_excerpt'), set_value('gc_to_name'));
+ $card['weight'] = 0;
+ $card['quantity'] = 1;
+ $card['shippable'] = false;
+ $card['taxable'] = 0;
+ $card['fixed_quantity'] = true;
+ $card['is_gc'] = true; // !Important
+ $card['track_stock'] = false; // !Imporortant
$card['gc_info'] = array("to_name" => set_value('gc_to_name'),
"to_email" => set_value('gc_to_email'),
diff --git a/gocart/controllers/checkout.php b/gocart/controllers/checkout.php
old mode 100755
new mode 100644
index 083af90d..18f07040
--- a/gocart/controllers/checkout.php
+++ b/gocart/controllers/checkout.php
@@ -1,412 +1,510 @@
load->helper(array('formatting_helper', 'form_helper'));
- $this->load->model(array('Page_model', 'Settings_model', 'Location_model'));
- $this->load->library('Go_cart');
-
- //make sure the cart isn't empty
+
+ /*make sure the cart isnt empty*/
if($this->go_cart->total_items()==0)
{
redirect('cart/view_cart');
}
-
- //fill in our variables
- $this->categories = $this->Category_model->get_categories_tierd(0);
- $this->pages = $this->Page_model->get_pages();
- $this->header_text = $this->Page_model->get_page(142);
- $gc_setting = $this->Settings_model->get_settings('gift_cards');
-
- if($gc_setting['enabled']==1)
- {
- $this->gift_cards_enabled = true;
- }
-
- if ($this->config->item('require_login'))
+
+ /*is the user required to be logged in?*/
+ if (config_item('require_login'))
{
$this->Customer_model->is_logged_in('checkout');
}
- }
- function index()
- {
-
- //everytime they try to checkout, see if they have something in their cart
- //this will redirect them to the empty cart page if they have already confirmed their order, and had their cart wiped from the session
- if ($this->go_cart->total_items()==0){
- redirect('cart/view_cart');
+ if(!config_item('allow_os_purchase') && config_item('inventory_enabled'))
+ {
+ /*double check the inventory of each item before proceeding to checkout*/
+ $inventory_check = $this->go_cart->check_inventory();
+
+ if($inventory_check)
+ {
+ /*
+ OOPS we have an error. someone else has gotten the scoop on our customer and bought products out from under them!
+ we need to redirect them to the view cart page and let them know that the inventory is no longer there.
+ */
+ $this->session->set_flashdata('error', $inventory_check);
+ redirect('cart/view_cart');
+ }
}
- //this hides the left column
- $data['hide_menu'] = true;
-
- $this->load->model('Customer_model');
-
- $data['gift_cards_enabled'] = $this->gift_cards_enabled;
- $data['page_title'] = 'Check Out';
-
-
- $data['customer'] = $this->go_cart->customer();
-
-
- // load other page content
- //$this->load->model('banner_model');
- $this->load->helper('directory');
+ /* Set no caching
- //if they want to limit to the top 5 banners and use the enable/disable on dates, add true to the get_banners function
- //$data['banners'] = $this->banner_model->get_banners();
- //$data['ads'] = $this->banner_model->get_banners(true);
- $data['categories'] = $this->Category_model->get_categories_tierd(0);
-
- $this->load->view('checkout/checkout', $data);
- }
+ header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
+ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
+ header("Cache-Control: no-store, no-cache, must-revalidate");
+ header("Cache-Control: post-check=0, pre-check=0", false);
+ header("Pragma: no-cache");
- function login()
- {
- $this->Customer_model->is_logged_in('checkout');
+ */
+ $this->load->library('form_validation');
}
-
- function register()
+
+ function index()
{
- $this->Customer_model->is_logged_in('checkout', 'secure/register');
+ /*show address first*/
+ $this->step_1();
}
-
- function shipping_payment_methods()
+
+ function step_1()
{
-
- //load the shipping modules
- $shipping_methods = array();
- foreach ($this->Settings_model->get_settings('shipping_modules') as $shipping_method=>$order)
+ $data['customer'] = $this->go_cart->customer();
+
+ if(isset($data['customer']['id']))
{
- //eventually, we will sort by order, but I'm not concerned with that at the moment
- $this->load->library('shipping/'.$shipping_method.'/'.$shipping_method);
-
- $shipping_methods = array_merge($shipping_methods, $this->$shipping_method->rates());
+ $data['customer_addresses'] = $this->Customer_model->get_address_list($data['customer']['id']);
}
-
-
- // Free shipping coupon applied ?
- if($this->go_cart->is_free_shipping())
+
+ /*require a billing address*/
+ $this->form_validation->set_rules('address_id', 'Billing Address ID', 'numeric');
+ $this->form_validation->set_rules('firstname', 'First Name', 'trim|required|max_length[32]');
+ $this->form_validation->set_rules('lastname', 'Last Name', 'trim|required|max_length[32]');
+ $this->form_validation->set_rules('email', 'Email', 'trim|required|valid_email|max_length[128]');
+ $this->form_validation->set_rules('phone', 'Phone', 'trim|required|max_length[32]');
+ $this->form_validation->set_rules('company', 'Company', 'trim|max_length[128]');
+ $this->form_validation->set_rules('address1', 'Address 1', 'trim|required|max_length[128]');
+ $this->form_validation->set_rules('address2', 'Address 2', 'trim|max_length[128]');
+ $this->form_validation->set_rules('city', 'City', 'trim|required|max_length[128]');
+ $this->form_validation->set_rules('country_id', 'Country', 'trim|required|numeric');
+ $this->form_validation->set_rules('zone_id', 'State', 'trim|required|numeric');
+
+ /*if there is post data, get the country info and see if the zip code is required*/
+ if($this->input->post('country_id'))
{
- // add free shipping as an option, but leave other options in case they want to upgrade
- $shipping_methods["Free Shipping (basic)"] = "0.00";
+ $country = $this->Location_model->get_country($this->input->post('country_id'));
+ if((bool)$country->postcode_required)
+ {
+ $this->form_validation->set_rules('zip', 'Zip', 'trim|required|max_length[10]');
+ }
}
-
- // format the values for currency display
- foreach($shipping_methods as &$method)
+ else
{
- // convert numeric values into an array containing numeric & formatted values
- $method = array('num'=>$method,'str'=>format_currency($method));
+ $this->form_validation->set_rules('zip', 'Zip', 'trim|max_length[10]');
}
-
- $ship['shipping_methods'] = $shipping_methods;
-
-
-
- //load the payment modules
- $pay['payment_methods'] = array();
-
- foreach ($this->Settings_model->get_settings('payment_modules') as $payment_method=>$order)
+
+ if ($this->form_validation->run() == false)
{
- $this->load->library('payment/'.$payment_method.'/'.$payment_method);
-
- $payment_form = $this->$payment_method->checkout_form();
- if(!empty($payment_form))
+ $data['address_form_prefix'] = 'bill';
+ $this->view('checkout/address_form', $data);
+ }
+ else
+ {
+ /*load any customer data to get their ID (if logged in)*/
+ $customer = $this->go_cart->customer();
+
+ $customer['bill_address']['company'] = $this->input->post('company');
+ $customer['bill_address']['firstname'] = $this->input->post('firstname');
+ $customer['bill_address']['lastname'] = $this->input->post('lastname');
+ $customer['bill_address']['email'] = $this->input->post('email');
+ $customer['bill_address']['phone'] = $this->input->post('phone');
+ $customer['bill_address']['address1'] = $this->input->post('address1');
+ $customer['bill_address']['address2'] = $this->input->post('address2');
+ $customer['bill_address']['city'] = $this->input->post('city');
+ $customer['bill_address']['zip'] = $this->input->post('zip');
+
+ /* get zone / country data using the zone id submitted as state*/
+ $country = $this->Location_model->get_country(set_value('country_id'));
+ $zone = $this->Location_model->get_zone(set_value('zone_id'));
+
+ $customer['bill_address']['zone'] = $zone->code; /* save the state for output formatted addresses */
+ $customer['bill_address']['country'] = $country->name; /* some shipping libraries require country name */
+ $customer['bill_address']['country_code'] = $country->iso_code_2; /* some shipping libraries require the code */
+ $customer['bill_address']['zone_id'] = $this->input->post('zone_id'); /* use the zone id to populate address state field value */
+ $customer['bill_address']['country_id'] = $this->input->post('country_id');
+
+ /* for guest customers, load the billing address data as their base info as well */
+ if(empty($customer['id']))
{
- $pay['payment_methods'][$payment_method] = array_merge($pay['payment_methods'], $payment_form);
+ $customer['company'] = $customer['bill_address']['company'];
+ $customer['firstname'] = $customer['bill_address']['firstname'];
+ $customer['lastname'] = $customer['bill_address']['lastname'];
+ $customer['phone'] = $customer['bill_address']['phone'];
+ $customer['email'] = $customer['bill_address']['email'];
+ }
+
+ if(!isset($customer['group_id']))
+ {
+ $customer['group_id'] = 1; /* default group */
}
+
+ /*if there is no address set then return blank*/
+ if(empty($customer['ship_address']))
+ {
+ $customer['ship_address'] = $customer['bill_address'];
+ }
+
+ /* save customer details*/
+ $this->go_cart->save_customer($customer);
+
+ /*send to the next form*/
+ redirect('checkout/step_2');
}
-
- //Load additional details
- $details = $this->go_cart->additional_details();
- //deadline content
- $this->load->model('Page_model');
- $details['deadline_content'] = $this->Page_model->get_page(144);
-
- $this->load->view('checkout/additional_details_form', $details);
- $this->load->view('checkout/shipping_form', $ship);
- $this->load->view('checkout/payment_form', $pay);
- }
-
- function save_additional_details()
- {
- //run everything through the XSS filter
- $this->go_cart->set_additional_details($this->input->post(null, true));
-
-
- print_r($this->input->post(null, true));
-
- //$this->session->set_flashdata('message', 'Your additional Details have been saved!');
-
- //redirect('checkout');
}
-
- function customer_details()
- {
- $this->load->view('checkout/customer_details_static', array('customer'=>$this->go_cart->customer()));
- }
-
- function customer_form()
+
+ function shipping_address()
{
- //clear shipping if showing the customer form
- $this->go_cart->clear_shipping();
-
$data['customer'] = $this->go_cart->customer();
+
if(isset($data['customer']['id']))
{
$data['customer_addresses'] = $this->Customer_model->get_address_list($data['customer']['id']);
}
-
- if(@$data['customer']['ship_address'] == @$data['customer']['bill_address'])
+
+ /*require a shipping address*/
+ $this->form_validation->set_rules('address_id', 'Billing Address ID', 'numeric');
+ $this->form_validation->set_rules('firstname', 'lang:address_firstname', 'trim|required|max_length[32]');
+ $this->form_validation->set_rules('lastname', 'lang:address_lastname', 'trim|required|max_length[32]');
+ $this->form_validation->set_rules('email', 'lang:address_email', 'trim|required|valid_email|max_length[128]');
+ $this->form_validation->set_rules('phone', 'lang:address_phone', 'trim|required|max_length[32]');
+ $this->form_validation->set_rules('company', 'lang:address_company', 'trim|max_length[128]');
+ $this->form_validation->set_rules('address1', 'lang:address1', 'trim|required|max_length[128]');
+ $this->form_validation->set_rules('address2', 'lang:address2', 'trim|max_length[128]');
+ $this->form_validation->set_rules('city', 'lang:address_city', 'trim|required|max_length[128]');
+ $this->form_validation->set_rules('country_id', 'lang:address_country', 'trim|required|numeric');
+ $this->form_validation->set_rules('zone_id', 'lang:address_state', 'trim|required|numeric');
+
+ /* if there is post data, get the country info and see if the zip code is required */
+ if($this->input->post('country_id'))
{
- $data['customer']['ship_to_bill_address'] = true;
+ $country = $this->Location_model->get_country($this->input->post('country_id'));
+ if((bool)$country->postcode_required)
+ {
+ $this->form_validation->set_rules('zip', 'lang:address_postcode', 'trim|required|max_length[10]');
+ }
}
else
{
- $data['customer']['ship_to_bill_address'] = false;
+ $this->form_validation->set_rules('zip', 'lang:address_postcode', 'trim|max_length[10]');
}
- $this->load->view('checkout/customer_details', $data);
- }
-
- // Validate & Save guest (non-logged in) customer address information
- function save_customer()
- {
- $this->load->library('form_validation');
- // only necessary if we need a separate shipping address
- if($this->input->post('ship_to_bill_address')!='yes')
- {
- $this->form_validation->set_rules('bill_address_id', 'Billing Address ID', 'numeric');
- $this->form_validation->set_rules('bill_firstname', 'Billing First Name', 'trim|required|max_length[32]');
- $this->form_validation->set_rules('bill_lastname', 'Billing Last Name', 'trim|required|max_length[32]');
- $this->form_validation->set_rules('bill_email', 'Billing Email', 'trim|required|valid_email|max_length[128]');
- $this->form_validation->set_rules('bill_phone', 'Billing Phone', 'trim|required|max_length[32]');
- $this->form_validation->set_rules('bill_company', 'Billing Company', 'trim|max_length[128]');
- $this->form_validation->set_rules('bill_address1', 'Billing Address 1', 'trim|required|max_length[128]');
- $this->form_validation->set_rules('bill_address2', 'Billing Address 2', 'trim|max_length[128]');
- $this->form_validation->set_rules('bill_city', 'Billing City', 'trim|required|max_length[128]');
- $this->form_validation->set_rules('bill_country_id', 'Billing Country', 'trim|required|numeric');
- $this->form_validation->set_rules('bill_zone_id', 'Billing State', 'trim|required|numeric');
- $this->form_validation->set_rules('bill_zip', 'Billing Zip', 'trim|required|max_length[10]');
+
+ if ($this->form_validation->run() == false)
+ {
+ /* show the address form but change it to be for shipping */
+ $data['address_form_prefix'] = 'ship';
+ $this->view('checkout/address_form', $data);
}
-
- $this->form_validation->set_rules('ship_address_id', 'Shipping Address ID', 'numeric');
- $this->form_validation->set_rules('ship_firstname', 'Shipping First Name', 'trim|required|max_length[32]');
- $this->form_validation->set_rules('ship_lastname', 'Shipping Last Name', 'trim|required|max_length[32]');
- $this->form_validation->set_rules('ship_email', 'Shipping Email', 'trim|required|valid_email|max_length[128]');
- $this->form_validation->set_rules('ship_phone', 'Shipping Phone', 'trim|required|max_length[32]');
- $this->form_validation->set_rules('ship_company', 'Shipping Company', 'trim|max_length[128]');
- $this->form_validation->set_rules('ship_address1', 'Shipping Address 1', 'trim|required|max_length[128]');
- $this->form_validation->set_rules('ship_address2', 'Shipping Address 2', 'trim|max_length[128]');
- $this->form_validation->set_rules('ship_city', 'Shipping City', 'trim|required|max_length[128]');
- $this->form_validation->set_rules('ship_country_id', 'Shipping Country', 'trim|required|numeric');
- $this->form_validation->set_rules('ship_zone_id', 'Shipping State', 'trim|required|numeric');
- $this->form_validation->set_rules('ship_zip', 'Shipping Zip', 'trim|required|max_length[10]');
-
-
-
- if ($this->form_validation->run())
+ else
{
- //load any customer data to get their ID (if logged in)
+ /* load any customer data to get their ID (if logged in) */
$customer = $this->go_cart->customer();
-
- $customer['ship_to_bill_address'] = 'false';
- $customer['ship_address']['firstname'] = $this->input->post('ship_firstname');
- $customer['ship_address']['lastname'] = $this->input->post('ship_lastname');
- $customer['ship_address']['email'] = $this->input->post('ship_email');
- $customer['ship_address']['phone'] = $this->input->post('ship_phone');
- $customer['ship_address']['company'] = $this->input->post('ship_company');
- $customer['ship_address']['address1'] = $this->input->post('ship_address1');
- $customer['ship_address']['address2'] = $this->input->post('ship_address2');
- $customer['ship_address']['city'] = $this->input->post('ship_city');
- $customer['ship_address']['zip'] = $this->input->post('ship_zip');
-
-
- // get zone / country data using the zone id submitted as state
- $ship_country = $this->Location_model->get_country($this->input->post('ship_country_id'));
- $ship_zone = $this->Location_model->get_zone($this->input->post('ship_zone_id'));
-
- $customer['ship_address']['zone'] = $ship_zone->code; // save the state for output formatted addresses
- $customer['ship_address']['country'] = $ship_country->name; // some shipping libraries require country name
- $customer['ship_address']['country_code'] = $ship_country->iso_code_2; // some shipping libraries require the code
- $customer['ship_address']['zone_id'] = $this->input->post('ship_zone_id'); // use the id's to populate address forms
- $customer['ship_address']['country_id'] = $this->input->post('ship_country_id');
-
- // Remember the chosen address ID for logged in customers, use as default in the future
- if(empty($customer['default_shipping_address']) && set_value('ship_address_id')!='')
- {
- $customer['default_shipping_address'] = set_value('ship_address_id');
- }
-
- if($this->input->post('ship_to_bill_address')=='yes')
- {
- $customer['ship_to_bill_address'] = 'true';
- $customer['bill_address'] = $customer['ship_address'];
-
- $customer['default_billing_address'] = @$customer['default_shipping_address'];
- }
- else
- {
-
- $customer['bill_address']['firstname'] = set_value('bill_firstname');
- $customer['bill_address']['lastname'] = set_value('bill_lastname');
- $customer['bill_address']['email'] = set_value('bill_email');
- $customer['bill_address']['phone'] = set_value('bill_phone');
- $customer['bill_address']['company'] = set_value('bill_company');
- $customer['bill_address']['address1'] = set_value('bill_address1');
- $customer['bill_address']['address2'] = set_value('bill_address2');
- $customer['bill_address']['city'] = set_value('bill_city');
- $customer['bill_address']['zip'] = set_value('bill_zip');
-
-
- // get zone / country data using the zone id submitted as state
- $bill_country = $this->Location_model->get_country(set_value('bill_country_id'));
- $bill_zone = $this->Location_model->get_zone(set_value('bill_zone_id'));
-
- $customer['bill_address']['zone'] = $bill_zone->code; // save the state for output formatted addresses
- $customer['bill_address']['country'] = $bill_country->name; // some shipping libraries require country name
- $customer['bill_address']['country_code'] = $bill_country->iso_code_2; // some shipping libraries require the code
- $customer['bill_address']['zone_id'] = set_value('bill_zone_id'); // use the zone id to populate address state field value
- $customer['bill_address']['country_id'] = set_value('bill_country_id');
-
- // Remember chosen ID
- if(empty($customer['default_billing_address']) && set_value('bill_address_id')!='')
- {
- $customer['default_billing_address'] = set_value('bill_address_id');
- }
-
- }
-
- // for guest customers, load the billing address data as their base info as well
+
+ $customer['ship_address']['company'] = $this->input->post('company');
+ $customer['ship_address']['firstname'] = $this->input->post('firstname');
+ $customer['ship_address']['lastname'] = $this->input->post('lastname');
+ $customer['ship_address']['email'] = $this->input->post('email');
+ $customer['ship_address']['phone'] = $this->input->post('phone');
+ $customer['ship_address']['address1'] = $this->input->post('address1');
+ $customer['ship_address']['address2'] = $this->input->post('address2');
+ $customer['ship_address']['city'] = $this->input->post('city');
+ $customer['ship_address']['zip'] = $this->input->post('zip');
+
+ /* get zone / country data using the zone id submitted as state */
+ $country = $this->Location_model->get_country(set_value('country_id'));
+ $zone = $this->Location_model->get_zone(set_value('zone_id'));
+
+ $customer['ship_address']['zone'] = $zone->code;
+ $customer['ship_address']['country'] = $country->name;
+ $customer['ship_address']['country_code'] = $country->iso_code_2;
+ $customer['ship_address']['zone_id'] = $this->input->post('zone_id');
+ $customer['ship_address']['country_id'] = $this->input->post('country_id');
+
+ /* for guest customers, load the shipping address data as their base info as well */
if(empty($customer['id']))
{
- $customer['company'] = $customer['bill_address']['company'];
- $customer['firstname'] = $customer['bill_address']['firstname'];
- $customer['lastname'] = $customer['bill_address']['lastname'];
- $customer['phone'] = $customer['bill_address']['phone'];
- $customer['email'] = $customer['bill_address']['email'];
+ $customer['company'] = $customer['ship_address']['company'];
+ $customer['firstname'] = $customer['ship_address']['firstname'];
+ $customer['lastname'] = $customer['ship_address']['lastname'];
+ $customer['phone'] = $customer['ship_address']['phone'];
+ $customer['email'] = $customer['ship_address']['email'];
}
-
+
if(!isset($customer['group_id']))
{
- $customer['group_id'] = 1; // default group
+ $customer['group_id'] = 1; /* default group */
}
-
- // save customer details
+
+ /* save customer details */
$this->go_cart->save_customer($customer);
-
- $return = array('status'=>'success');
-
- //customer details
- $return['view'] = $this->load->view('checkout/customer_details_static', array('customer'=>$customer), true);
-
- //shipping/payment information
- echo json_encode($return);
+
+ /* send to the next form */
+ redirect('checkout/step_2');
}
+ }
+
+ function step_2()
+ {
+ /* where to next? Shipping? */
+ $shipping_methods = $this->_get_shipping_methods();
+
+ if($shipping_methods)
+ {
+ $this->shipping_form($shipping_methods);
+ }
+ /* now where? continue to step 3 */
else
{
- echo json_encode(array('status'=>'error', 'error'=>validation_errors()));
+ $this->step_3();
}
}
-
- // this is here for ajax use
- function get_formatted_currency()
+
+ protected function shipping_form($shipping_methods)
{
- $value = $this->input->post('value');
- echo format_currency($value);
+ $data['customer'] = $this->go_cart->customer();
+
+ /* do we have a selected shipping method already? */
+ $shipping = $this->go_cart->shipping_method();
+ $data['shipping_code'] = $shipping['code'];
+ $data['shipping_methods'] = $shipping_methods;
+
+ $this->form_validation->set_rules('shipping_notes', 'lang:shipping_information', 'trim|xss_clean');
+ $this->form_validation->set_rules('shipping_method', 'lang:shipping_method', 'trim|callback_validate_shipping_option');
+
+ if($this->form_validation->run() == false)
+ {
+ $this->view('checkout/shipping_form', $data);
+ }
+ else
+ {
+ /* we have shipping details! */
+ $this->go_cart->set_additional_detail('shipping_notes', $this->input->post('shipping_notes'));
+
+ /* parse out the shipping information */
+ $shipping_method = json_decode($this->input->post('shipping_method'));
+ $shipping_code = md5($this->input->post('shipping_method'));
+
+ /* set shipping info */
+ $this->go_cart->set_shipping($shipping_method[0], $shipping_method[1]->num, $shipping_code);
+
+ redirect('checkout/step_3');
+ }
}
-
- function save_shipping_method()
+
+ /*
+ callback for shipping form
+ if callback is true then it's being called for form_Validation
+ In that case, set the message otherwise just return true or false
+ */
+ function validate_shipping_option($str, $callback=true)
{
- $shipping = $this->input->post('shipping');
- $shipping = spliti(':', $shipping);
-
- $this->go_cart->set_shipping( $shipping[0], $shipping[1]);
-
- echo "1";
+ $shipping_methods = $this->_get_shipping_methods();
+
+ if($shipping_methods)
+ {
+ foreach($shipping_methods as $key=>$val)
+ {
+ $check = json_encode(array($key, $val));
+ if($str == md5($check))
+ {
+ return $check;
+ }
+ }
+ }
+
+ /* if we get there there is no match and they have submitted an invalid option */
+ $this->form_validation->set_message('validate_shipping_option', lang('error_invalid_shipping_method'));
+ return FALSE;
+
}
-
- function order_summary()
+
+ private function _get_shipping_methods()
{
- $this->load->view('checkout/summary');
+ $shipping_methods = array();
+ /* do we need shipping? */
+
+ if(config_item('require_shipping'))
+ {
+ /* do the cart contents require shipping? */
+ if($this->go_cart->requires_shipping())
+ {
+ /* ok so lets grab some shipping methods. If none exists, then we know that shipping isn't going to happen! */
+ foreach ($this->Settings_model->get_settings('shipping_modules') as $shipping_method=>$order)
+ {
+ $this->load->add_package_path(APPPATH.'packages/shipping/'.$shipping_method.'/');
+ /* eventually, we will sort by order, but I'm not concerned with that at the moment */
+ $this->load->library($shipping_method);
+
+ $shipping_methods = array_merge($shipping_methods, $this->$shipping_method->rates());
+ }
+
+ /* Free shipping coupon applied ? */
+ if($this->go_cart->is_free_shipping())
+ {
+ /* add free shipping as an option, but leave other options in case they want to upgrade */
+ $shipping_methods[lang('free_shipping_basic')] = "0.00";
+ }
+
+ /* format the values for currency display */
+ foreach($shipping_methods as &$method)
+ {
+ /* convert numeric values into an array containing numeric & formatted values */
+ $method = array('num'=>$method,'str'=>format_currency($method));
+ }
+ }
+ }
+ if(!empty($shipping_methods))
+ {
+ /* everything says that shipping is required! */
+ return $shipping_methods;
+ }
+ else
+ {
+ return false;
+ }
}
-
- function save_payment_method()
+
+ function step_3()
{
- $module = $this->input->post('module');
-
- if($module)
- {
- $this->load->library('payment/'.$module.'/'.$module);
-
- $check = $this->$module->checkout_check();
- if(!$check)
+ /*
+ Some error checking
+ see if we have the billing address
+ */
+ $customer = $this->go_cart->customer();
+ if(empty($customer['bill_address']))
+ {
+ redirect('checkout/step_1');
+ }
+
+ /* see if shipping is required and set. */
+ if(config_item('require_shipping') && $this->go_cart->requires_shipping() && $this->_get_shipping_methods())
+ {
+ $code = $this->validate_shipping_option($this->go_cart->shipping_code());
+
+ if(!$code)
{
- $this->go_cart->set_payment($module, $this->$module->description() );
-
- echo json_encode(array('status'=>'success'));
+ redirect('checkout/step_2');
}
- else
+ }
+
+
+ if($payment_methods = $this->_get_payment_methods())
+ {
+ $this->payment_form($payment_methods);
+ }
+ /* now where? continue to step 4 */
+ else
+ {
+ $this->step_4();
+ }
+ }
+
+ protected function payment_form($payment_methods)
+ {
+ /* find out if we need to display the shipping */
+ $data['customer'] = $this->go_cart->customer();
+ $data['shipping_method'] = $this->go_cart->shipping_method();
+
+ /* are the being bounced back? */
+ $data['payment_method'] = $this->go_cart->payment_method();
+
+ /* pass in the payment methods */
+ $data['payment_methods'] = $payment_methods;
+
+ /* require that a payment method is selected */
+ $this->form_validation->set_rules('module', 'lang:payment_method', 'trim|required|xss_clean|callback_check_payment');
+
+ $module = $this->input->post('module');
+ if($module)
+ {
+ $this->load->add_package_path(APPPATH.'packages/payment/'.$module.'/');
+ $this->load->library($module);
+ }
+
+ if($this->form_validation->run() == false)
+ {
+ $this->view('checkout/payment_form', $data);
+ }
+ else
+ {
+ $this->go_cart->set_payment( $module, $this->$module->description() );
+ redirect('checkout/step_4');
+ }
+ }
+ /* callback that lets the payment method return an error if invalid */
+ function check_payment($module)
+ {
+ $check = $this->$module->checkout_check();
+
+ if(!$check)
+ {
+ return true;
+ }
+ else
+ {
+ $this->form_validation->set_message('check_payment', $check);
+ }
+ }
+
+ private function _get_payment_methods()
+ {
+ $payment_methods = array();
+ if($this->go_cart->total() != 0)
+ {
+ foreach ($this->Settings_model->get_settings('payment_modules') as $payment_method=>$order)
{
- // send back the errors
- echo json_encode(array('status'=>'error', 'error'=>$check));
+ $this->load->add_package_path(APPPATH.'packages/payment/'.$payment_method.'/');
+ $this->load->library($payment_method);
+
+ $payment_form = $this->$payment_method->checkout_form();
+
+ if(!empty($payment_form))
+ {
+ $payment_methods[$payment_method] = $payment_form;
+ }
}
}
+ if(!empty($payment_methods))
+ {
+ return $payment_methods;
+ }
+ else
+ {
+ return false;
+ }
}
-
- function confirmation_contents()
+
+ function step_4()
{
- $data['customer'] = $this->go_cart->customer();
- $data['shipping'] = $this->go_cart->shipping_method();
- $data['payment'] = $this->go_cart->payment_method();
-
- $this->load->view('checkout/sconfirm', $data);
+ /* get addresses */
+ $data['customer'] = $this->go_cart->customer();
+
+ $data['shipping_method'] = $this->go_cart->shipping_method();
+
+ $data['payment_method'] = $this->go_cart->payment_method();
+
+
+ /* Confirm the sale */
+ $this->view('checkout/confirm', $data);
}
-
+
+ function login()
+ {
+ $this->Customer_model->is_logged_in('checkout');
+ }
+
+ function register()
+ {
+ $this->Customer_model->is_logged_in('checkout', 'secure/register');
+ }
+
function place_order()
{
-
// retrieve the payment method
- $payment = $this->go_cart->payment_method();
- //die(var_dump($payment));
-
- // verify that we intend to place the order
- if( ! $this->input->post('process_order') && !isset($payment['confirmed']))
- {
- redirect('/'); // otherwise, send them packing
- }
+ $payment = $this->go_cart->payment_method();
+ $payment_methods = $this->_get_payment_methods();
//make sure they're logged in if the config file requires it
if($this->config->item('require_login'))
{
$this->Customer_model->is_logged_in();
}
-
// are we processing an empty cart?
$contents = $this->go_cart->contents();
@@ -414,49 +512,78 @@ function place_order()
{
redirect('cart/view_cart');
} else {
- // do some secondary validation on cart contents before we continue
-
// - check to see if we have a payment method set, if we need one
- if(empty($payment) && $this->go_cart->total()>0)
+ if(empty($payment) && $this->go_cart->total() > 0 && (bool)$payment_methods == true)
{
- redirect('checkout');
+ redirect('checkout/step_3');
}
}
- // Is payment bypassed? (total is zero, or processed flag is set)
- if($this->go_cart->total() > 0 && ! isset($payment['confirmed'])) {
-
- //lost the payment module
- $this->load->library('payment/'.$payment['module'].'/'.$payment['module']);
-
- //run the payment
- $error_status = $this->$payment['module']->process_payment();
- if($error_status !== false)
- {
- // send them back to the checkout page with the error
- $this->session->set_flashdata('error', $error_status);
- redirect('checkout');
+ if(!empty($payment) && (bool)$payment_methods == true)
+ {
+ //load the payment module
+ $this->load->add_package_path(APPPATH.'packages/payment/'.$payment['module'].'/');
+ $this->load->library($payment['module']);
+
+ // Is payment bypassed? (total is zero, or processed flag is set)
+ if($this->go_cart->total() > 0 && ! isset($payment['confirmed'])) {
+ //run the payment
+ $error_status = $this->$payment['module']->process_payment();
+ if($error_status !== false)
+ {
+ // send them back to the payment page with the error
+ $this->session->set_flashdata('error', $error_status);
+ redirect('checkout/step_3');
+ }
}
-
}
+
- //// save the order
+ // save the order
$order_id = $this->go_cart->save_order();
$data['order_id'] = $order_id;
$data['shipping'] = $this->go_cart->shipping_method();
$data['payment'] = $this->go_cart->payment_method();
$data['customer'] = $this->go_cart->customer();
- $data['additional_details'] = $this->go_cart->additional_details();
- $data['hide_menu'] = true;
+ $data['shipping_notes'] = $this->go_cart->get_additional_detail('shipping_notes');
+ $data['referral'] = $this->go_cart->get_additional_detail('referral');
+ $order_downloads = $this->go_cart->get_order_downloads();
+ $data['hide_menu'] = true;
+
+ // run the complete payment module method once order has been saved
+ if(!empty($payment))
+ {
+ if(method_exists($this->$payment['module'], 'complete_payment'))
+ {
+ $this->$payment['module']->complete_payment($data);
+ }
+ }
+
// Send the user a confirmation email
// - get the email template
$this->load->model('messages_model');
$row = $this->messages_model->get_message(7);
+ $download_section = '';
+ if( ! empty($order_downloads))
+ {
+ // get the download link segment to insert into our confirmations
+ $downlod_msg_record = $this->messages_model->get_message(8);
+
+ if(!empty($data['customer']['id']))
+ {
+ // they can access their downloads by logging in
+ $download_section = str_replace('{download_link}', anchor('secure/my_downloads', lang('download_link')),$downlod_msg_record['content']);
+ } else {
+ // non regs will receive a code
+ $download_section = str_replace('{download_link}', anchor('secure/my_downloads/'.$order_downloads['code'], lang('download_link')), $downlod_msg_record['content']);
+ }
+ }
+
$row['content'] = html_entity_decode($row['content']);
// set replacement values for subject & body
@@ -474,6 +601,9 @@ function place_order()
// {order_summary}
$row['content'] = str_replace('{order_summary}', $this->load->view('order_email', $data, true), $row['content']);
+
+ // {download_section}
+ $row['content'] = str_replace('{download_section}', $download_section, $row['content']);
$this->load->library('email');
@@ -490,6 +620,7 @@ function place_order()
{
$this->email->to($data['customer']['ship_address']['email']);
}
+
//email the admin
$this->email->bcc($this->config->item('email'));
@@ -500,10 +631,24 @@ function place_order()
$data['page_title'] = 'Thanks for shopping with '.$this->config->item('company_name');
$data['gift_cards_enabled'] = $this->gift_cards_enabled;
- // show final confirmation page
- $this->load->view('order_placed', $data);
-
- //remove the cart from the session
+ $data['download_section'] = $download_section;
+
+
+ /* get all cart information before destroying the cart session info */
+ $data['go_cart']['group_discount'] = $this->go_cart->group_discount();
+ $data['go_cart']['subtotal'] = $this->go_cart->subtotal();
+ $data['go_cart']['coupon_discount'] = $this->go_cart->coupon_discount();
+ $data['go_cart']['order_tax'] = $this->go_cart->order_tax();
+ $data['go_cart']['discounted_subtotal'] = $this->go_cart->discounted_subtotal();
+ $data['go_cart']['shipping_cost'] = $this->go_cart->shipping_cost();
+ $data['go_cart']['gift_card_discount'] = $this->go_cart->gift_card_discount();
+ $data['go_cart']['total'] = $this->go_cart->total();
+ $data['go_cart']['contents'] = $this->go_cart->contents();
+
+ /* remove the cart from the session */
$this->go_cart->destroy();
+
+ /* show final confirmation page */
+ $this->load->view('order_placed', $data);
}
}
\ No newline at end of file
diff --git a/gocart/controllers/pp_gate.php b/gocart/controllers/pp_gate.php
index 97e3e7f9..4d5a6826 100644
--- a/gocart/controllers/pp_gate.php
+++ b/gocart/controllers/pp_gate.php
@@ -5,8 +5,8 @@ class pp_gate extends CI_Controller {
function __construct()
{
parent::__construct();
-
- $this->load->library(array('payment/paypal_express/paypal', 'payment/paypal_express/httprequest', 'go_cart'));
+ $this->load->add_package_path(APPPATH.'packages/payment/paypal_express/');
+ $this->load->library(array('paypal', 'httprequest', 'go_cart'));
$this->load->helper('form_helper');
}
@@ -37,12 +37,12 @@ function pp_return()
// send them back to the cart payment page to finish the order
// the confirm flag will bypass payment processing and save up
- redirect('scheckout/place_order/');
+ redirect('checkout/place_order/');
} else {
// Possible fake request; was not verified by paypal. Could be due to a double page-get, should never happen under normal circumstances
$this->session->set_flashdata('message', "Paypal did not validate your order. Either it has been processed already, or something else went wrong. If you believe there has been a mistake, please contact us.
");
- redirect('scheckout');
+ redirect('checkout');
}
}
@@ -61,7 +61,7 @@ function pp_cancel()
// User canceled using paypal, send them back to the payment page
$cart = $this->session->userdata('cart');
$this->session->set_flashdata('message', "Paypal transaction canceled, select another payment method
");
- redirect('scheckout');
+ redirect('checkout');
}
}
\ No newline at end of file
diff --git a/gocart/controllers/secure.php b/gocart/controllers/secure.php
old mode 100755
new mode 100644
index 1b485e1a..7816acef
--- a/gocart/controllers/secure.php
+++ b/gocart/controllers/secure.php
@@ -1,52 +1,23 @@
load->library('Go_cart');
- $this->load->model(array('Page_model', 'Product_model', 'Option_model','location_model'));
- $this->load->helper('form_helper');
+ $this->load->model(array('location_model'));
$this->customer = $this->go_cart->customer();
-
- //fill up our categories variable
- $this->categories = $this->Category_model->get_categories_tierd(0);
- $this->pages = $this->Page_model->get_pages(0, array(138));
- $this->header_text = $this->Page_model->get_page(142);
- $gc_setting = $this->Settings_model->get_settings('gift_cards');
- if(!empty($gc_setting['enabled']) && $gc_setting['enabled']==1) $this->gift_cards_enabled = true;
}
function index()
{
- //we don't have a default landing page for secure
- redirect('');
+ show_404();
}
function login($ajax = false)
@@ -103,7 +74,7 @@ function login($ajax = false)
else
{
$this->session->set_flashdata('redirect', $redirect);
- $this->session->set_flashdata('error', 'Authentication Failed!');
+ $this->session->set_flashdata('error', lang('login_failed'));
redirect('secure/login');
}
@@ -149,7 +120,7 @@ function register()
*/
$data['redirect'] = $this->session->flashdata('redirect');
- $data['page_title'] = 'Account Registration';
+ $data['page_title'] = lang('account_registration');
$data['gift_cards_enabled'] = $this->gift_cards_enabled;
//default values are empty if the customer is new
@@ -198,15 +169,15 @@ function register()
$save['id'] = false;
- $save['firstname'] = set_value('firstname');
- $save['lastname'] = set_value('lastname');
- $save['email'] = set_value('email');
- $save['phone'] = set_value('phone');
- $save['company'] = set_value('company');
+ $save['firstname'] = $this->input->post('firstname');
+ $save['lastname'] = $this->input->post('lastname');
+ $save['email'] = $this->input->post('email');
+ $save['phone'] = $this->input->post('phone');
+ $save['company'] = $this->input->post('company');
$save['active'] = $this->config->item('new_customer_status');
- $save['email_subscribe'] = set_value('email_subscribe');
+ $save['email_subscribe'] = intval((bool)$this->input->post('email_subscribe'));
- $save['password'] = set_value('password');
+ $save['password'] = $this->input->post('password');
$redirect = $this->input->post('redirect');
@@ -227,8 +198,8 @@ function register()
// set replacement values for subject & body
// {customer_name}
- $row['subject'] = str_replace('{customer_name}', set_value('firstname').' '. set_value('lastname'), $row['subject']);
- $row['content'] = str_replace('{customer_name}', set_value('firstname').' '. set_value('lastname'), $row['content']);
+ $row['subject'] = str_replace('{customer_name}', $this->input->post('firstname').' '. $this->input->post('lastname'), $row['subject']);
+ $row['content'] = str_replace('{customer_name}', $this->input->post('firstname').' '. $this->input->post('lastname'), $row['content']);
// {url}
$row['subject'] = str_replace('{url}', $this->config->item('base_url'), $row['subject']);
@@ -252,10 +223,10 @@ function register()
$this->email->send();
- $this->session->set_flashdata('message', 'Thanks for registering '.set_value('firstname').'!');
+ $this->session->set_flashdata('message', sprintf( lang('registration_thanks'), $this->input->post('firstname') ) );
//lets automatically log them in
- $this->Customer_model->login($save['email'], set_value('confirm'));
+ $this->Customer_model->login($save['email'], $this->input->post('confirm'));
//we're just going to make this secure regardless, because we don't know if they are
//wanting to redirect to an insecure location, if it needs to be secured then we can use the secure redirect in the controller
@@ -277,7 +248,7 @@ function check_email($str)
if ($email)
{
- $this->form_validation->set_message('check_email', 'The requested email is already in use.');
+ $this->form_validation->set_message('check_email', lang('error_email'));
return FALSE;
}
else
@@ -288,7 +259,7 @@ function check_email($str)
function forgot_password()
{
- $data['page_title'] = 'Forgot Password';
+ $data['page_title'] = lang('forgot_password');
$data['gift_cards_enabled'] = $this->gift_cards_enabled;
$submitted = $this->input->post('submitted');
if ($submitted)
@@ -300,11 +271,11 @@ function forgot_password()
if ($reset)
{
- $this->session->set_flashdata('message', 'A new password has been generated and sent to your email.');
+ $this->session->set_flashdata('message', lang('message_new_password'));
}
else
{
- $this->session->set_flashdata('message', 'There is no record of your account.');
+ $this->session->set_flashdata('error', lang('error_no_account_record'));
}
redirect('secure/forgot_password');
}
@@ -329,7 +300,7 @@ function my_account($offset=0)
$data['gift_cards_enabled'] = $this->gift_cards_enabled;
- $data['customer'] = $this->go_cart->customer();
+ $data['customer'] = (array)$this->Customer_model->get_customer($this->customer['id']);
$data['addresses'] = $this->Customer_model->get_address_list($this->customer['id']);
@@ -351,10 +322,32 @@ function my_account($offset=0)
// paginate the orders
$this->load->library('pagination');
- $config['base_url'] = base_url().'secure/my_account';
+ $config['base_url'] = site_url('secure/my_account');
$config['total_rows'] = $this->order_model->count_customer_orders($this->customer['id']);
$config['per_page'] = '15';
+ $config['first_link'] = 'First';
+ $config['first_tag_open'] = '';
+ $config['first_tag_close'] = '';
+ $config['last_link'] = 'Last';
+ $config['last_tag_open'] = '';
+ $config['last_tag_close'] = '';
+
+ $config['full_tag_open'] = '';
+ $config['cur_tag_open'] = '';
+ $config['cur_tag_close'] = '';
+
+ $config['num_tag_open'] = '';
+ $config['num_tag_close'] = '';
+
+ $config['prev_link'] = '«';
+ $config['prev_tag_open'] = '';
+ $config['prev_tag_close'] = '';
+
+ $config['next_link'] = '»';
+ $config['next_tag_open'] = '';
+ $config['next_tag_close'] = '';
$this->pagination->initialize($config);
@@ -398,35 +391,76 @@ function my_account($offset=0)
else
{
$customer = array();
- $customer['id'] = $this->customer['id'];
- $customer['company'] = set_value('company');
- $customer['firstname'] = set_value('firstname');
- $customer['lastname'] = set_value('lastname');
- $customer['email'] = set_value('email');
- $customer['phone'] = set_value('phone');
- $customer['email_subscribe'] = set_value('email_subscribe');
+ $customer['id'] = $this->customer['id'];
+ $customer['company'] = $this->input->post('company');
+ $customer['firstname'] = $this->input->post('firstname');
+ $customer['lastname'] = $this->input->post('lastname');
+ $customer['email'] = $this->input->post('email');
+ $customer['phone'] = $this->input->post('phone');
+ $customer['email_subscribe'] = intval((bool)$this->input->post('email_subscribe'));
if($this->input->post('password') != '')
{
- $customer['password'] = set_value('password');
+ $customer['password'] = $this->input->post('password');
}
- $this->customer['company'] = set_value('company');
- $this->customer['firstname'] = set_value('firstname');
- $this->customer['lastname'] = set_value('lastname');
- $this->customer['email'] = set_value('email');
- $this->customer['phone'] = set_value('phone');
- $this->customer['email_subscribe'] = set_value('email_subscribe');
-
+
$this->go_cart->save_customer($this->customer);
$this->Customer_model->save($customer);
- $this->session->set_flashdata('message', 'Your account has been updated');
+ $this->session->set_flashdata('message', lang('message_account_updated'));
redirect('secure/my_account');
- //$this->load->view('my_account', $data);
}
}
+
+ function my_downloads($code=false)
+ {
+
+ if($code!==false)
+ {
+ $data['downloads'] = $this->Digital_Product_model->get_downloads_by_code($code);
+ } else {
+ $this->Customer_model->is_logged_in();
+
+ $customer = $this->go_cart->customer();
+
+ $data['downloads'] = $this->Digital_Product_model->get_user_downloads($customer['id']);
+ }
+
+ $data['gift_cards_enabled'] = $this->gift_cards_enabled;
+
+ $data['page_title'] = lang('my_downloads');
+
+ $this->load->view('my_downloads', $data);
+ }
+
+
+ function download($link)
+ {
+ $filedata = $this->Digital_Product_model->get_file_info_by_link($link);
+
+ // missing file (bad link)
+ if(!$filedata)
+ {
+ show_404();
+ }
+
+ // validate download counter
+ if(intval($filedata->downloads) >= intval($filedata->max_downloads))
+ {
+ show_404();
+ }
+
+ // increment downloads counter
+ $this->Digital_Product_model->touch_download($link);
+
+ // Deliver file
+ $this->load->helper('download');
+ force_download('uploads/digital_uploads/', $filedata->filename);
+ }
+
+
function set_default_address()
{
$id = $this->input->post('id');
@@ -557,15 +591,15 @@ function address_form($id = 0)
$a = array();
$a['id'] = ($id==0) ? '' : $id;
$a['customer_id'] = $this->customer['id'];
- $a['field_data']['company'] = set_value('company');
- $a['field_data']['firstname'] = set_value('firstname');
- $a['field_data']['lastname'] = set_value('lastname');
- $a['field_data']['email'] = set_value('email');
- $a['field_data']['phone'] = set_value('phone');
- $a['field_data']['address1'] = set_value('address1');
- $a['field_data']['address2'] = set_value('address2');
- $a['field_data']['city'] = set_value('city');
- $a['field_data']['zip'] = set_value('zip');
+ $a['field_data']['company'] = $this->input->post('company');
+ $a['field_data']['firstname'] = $this->input->post('firstname');
+ $a['field_data']['lastname'] = $this->input->post('lastname');
+ $a['field_data']['email'] = $this->input->post('email');
+ $a['field_data']['phone'] = $this->input->post('phone');
+ $a['field_data']['address1'] = $this->input->post('address1');
+ $a['field_data']['address2'] = $this->input->post('address2');
+ $a['field_data']['city'] = $this->input->post('city');
+ $a['field_data']['zip'] = $this->input->post('zip');
// get zone / country data using the zone id submitted as state
$country = $this->location_model->get_country(set_value('country_id'));
@@ -575,41 +609,16 @@ function address_form($id = 0)
$a['field_data']['zone'] = $zone->code; // save the state for output formatted addresses
$a['field_data']['country'] = $country->name; // some shipping libraries require country name
$a['field_data']['country_code'] = $country->iso_code_2; // some shipping libraries require the code
- $a['field_data']['country_id'] = set_value('country_id');
- $a['field_data']['zone_id'] = set_value('zone_id');
+ $a['field_data']['country_id'] = $this->input->post('country_id');
+ $a['field_data']['zone_id'] = $this->input->post('zone_id');
}
$this->Customer_model->save_address($a);
- $this->session->set_flashdata('message', 'Your address has been saved!');
+ $this->session->set_flashdata('message', lang('message_address_saved'));
echo 1;
}
}
- // address management functions
- /*
- function save_address()
- {
- $data = $this->input->post('address');
- if($data)
- {
- $customer = $this->go_cart->customer();
- $data['customer_id'] = $customer['id'];
-
- // get zone / country data using the zone id submitted as state
- $country = $this->location_model->get_country_by_zone_id(set_value('state'));
- if(!empty($country))
- {
- $data['field_data']['state'] = $country->code; // save the state for output formatted addresses
- $data['field_data']['country'] = $country->c_name; // some shipping libraries require country name
- $data['field_data']['country_code'] = $country->iso_code_2; // some shipping libraries require the code
- $data['field_data']['zone_id'] = set_value('state'); // use the zone id to populate address state field value
- }
-
- echo json_encode(array('id'=>$this->Customer_model->save_address($data)));
- }
- }
- */
-
function delete_address()
{
$id = $this->input->post('id');
@@ -618,32 +627,4 @@ function delete_address()
$this->Customer_model->delete_address($id, $customer['id']);
echo $id;
}
-
- function send_email_comments()
- {
-
- if(!$this->input->post('submitted'))
- {
- $this->load->view('email_comments');
-
- } else {
-
- $this->load->library('email');
-
- $config['mailtype'] = 'html';
-
- $this->email->initialize($config);
-
- $this->email->from($this->input->post('email'), $this->input->post('name'));
- $this->email->to($this->config->item('email'));
-
- $this->email->subject('New comments submitted from '.$this->config->item('company_name'));
- $this->email->message($this->input->post('comments'));
-
- $this->email->send();
-
- // load to close the iframe
- $this->load->view('email_comments', array('finished'=>true));
- }
- }
}
\ No newline at end of file
diff --git a/gocart/core/MY_Controller.php b/gocart/core/MY_Controller.php
new file mode 100644
index 00000000..e655d06d
--- /dev/null
+++ b/gocart/core/MY_Controller.php
@@ -0,0 +1,125 @@
+load->library('migration');
+
+ // Migrate to the latest migration file found
+ if ( ! $this->migration->latest())
+ {
+ log_message('error', 'The migration failed');
+ }
+
+ }//end __construct()
+
+}//end Base_Controller
+
+class Front_Controller extends Base_Controller
+{
+
+ //we collect the categories automatically with each load rather than for each function
+ //this just cuts the codebase down a bit
+ var $categories = '';
+
+ //load all the pages into this variable so we can call it from all the methods
+ var $pages = '';
+
+ // determine whether to display gift card link on all cart pages
+ // This is Not the place to enable gift cards. It is a setting that is loaded during instantiation.
+ var $gift_cards_enabled;
+
+ function __construct(){
+
+ parent::__construct();
+
+ //load GoCart library
+ $this->load->library('Go_cart');
+
+ //load needed models
+ $this->load->model(array('Page_model', 'Product_model', 'Digital_Product_model', 'Gift_card_model', 'Option_model', 'Order_model', 'Settings_model'));
+
+ //load helpers
+ $this->load->helper(array('form_helper', 'formatting_helper'));
+
+ //fill in our variables
+ $this->categories = $this->Category_model->get_categories_tierd(0);
+ $this->pages = $this->Page_model->get_pages();
+
+ // check if giftcards are enabled
+ $gc_setting = $this->Settings_model->get_settings('gift_cards');
+ if(!empty($gc_setting['enabled']) && $gc_setting['enabled']==1)
+ {
+ $this->gift_cards_enabled = true;
+ }
+ else
+ {
+ $this->gift_cards_enabled = false;
+ }
+
+ //load the theme package
+ $this->load->add_package_path(APPPATH.'themes/'.$this->config->item('theme').'/');
+ }
+
+ /*
+ This works exactly like the regular $this->load->view()
+ The difference is it automatically pulls in a header and footer.
+ */
+ function view($view, $vars = array(), $string=false)
+ {
+ if($string)
+ {
+ $result = $this->load->view('header', $vars, true);
+ $result .= $this->load->view($view, $vars, true);
+ $result .= $this->load->view('footer', $vars, true);
+
+ return $result;
+ }
+ else
+ {
+ $this->load->view('header', $vars);
+ $this->load->view($view, $vars);
+ $this->load->view('footer', $vars);
+ }
+ }
+
+ /*
+ This function simple calls $this->load->view()
+ */
+ function partial($view, $vars = array(), $string=false)
+ {
+ if($string)
+ {
+ return $this->load->view($view, $vars, true);
+ }
+ else
+ {
+ $this->load->view($view, $vars);
+ }
+ }
+}
+
+class Admin_Controller extends Base_Controller
+{
+ function __construct()
+ {
+
+ parent::__construct();
+
+ $this->load->library('auth');
+ $this->auth->is_logged_in(uri_string());
+
+ //load the base language file
+ $this->lang->load('admin_common');
+ $this->lang->load('goedit');
+ }
+}
\ No newline at end of file
diff --git a/gocart/core/MY_Router.php b/gocart/core/MY_Router.php
new file mode 100644
index 00000000..d3433d5c
--- /dev/null
+++ b/gocart/core/MY_Router.php
@@ -0,0 +1,112 @@
+uri->segments;
+
+ // Turn the segment array into a URI string
+ $uri = implode('/', $segments);
+
+ // Is there a literal match? If so we're done
+ if (isset($this->routes[$uri]))
+ {
+ return $this->_set_request(explode('/', $this->routes[$uri]));
+ }
+
+ // Loop through the route array looking for wild-cards
+ foreach ($this->routes as $key => $val)
+ {
+ // Convert wild-cards to RegEx
+ $key = str_replace(':any', '.+', str_replace(':num', '[0-9]+', $key));
+
+ // Does the RegEx match?
+ if (preg_match('#^'.$key.'$#', $uri))
+ {
+ // Do we have a back-reference?
+ if (strpos($val, '$') !== FALSE AND strpos($key, '(') !== FALSE)
+ {
+ $val = preg_replace('#^'.$key.'$#', $val, $uri);
+ }
+
+ return $this->_set_request(explode('/', $val));
+ }
+ }
+
+ // now try the GoCart specific routing
+ $segments = array_splice($segments, -2, 2);
+
+ // Turn the segment array into a URI string
+ $uri = implode('/', $segments);
+
+ //look through the database for a route that matches and apply the same logic as above :-)
+ //load the database connection information
+ require_once BASEPATH.'database/DB'.EXT;
+
+ if(count($segments) == 1)
+ {
+ $row = $this->_get_db_route($segments[0]);
+
+ if(!empty($row))
+ {
+ return $this->_set_request(explode('/', $row['route']));
+ }
+ }
+ else
+ {
+ $segments = array_reverse($segments);
+ //start with the end just to make sure we're not a multi-tiered category or category/product combo before moving to the second segment
+ //we could stop people from naming products or categories after numbers, but that would be limiting their use.
+ $row = $this->_get_db_route($segments[0]);
+ //set a pagination flag. If this is set true in the next if statement we'll know that the first row is segment is possibly a page number
+ $page_flag = false;
+ if($row)
+ {
+ return $this->_set_request(explode('/', $row['route']));
+ }
+ else
+ {
+ //this is the second go
+ $row = $this->_get_db_route($segments[1]);
+ $page_flag = true;
+ }
+
+ //we have a hit, continue down the path!
+ if($row)
+ {
+ if(!$page_flag)
+ {
+ return $this->_set_request(explode('/', $row['route']));
+ }
+ else
+ {
+ $key = $row['slug'].'/([0-9]+)';
+
+ //pages can only be numerical. This could end in a mighty big error!!!!
+ if (preg_match('#^'.$key.'$#', $uri))
+ {
+ $row['route'] = preg_replace('#^'.$key.'$#', $row['route'],$uri);
+ return $this->_set_request(explode('/', $row['route']));
+ }
+ }
+ }
+ }
+
+ // If we got this far it means we didn't encounter a
+ // matching route so we'll set the site default route
+ $this->_set_request($this->uri->segments);
+ }
+
+ function _get_db_route($slug)
+ {
+ return DB()->where('slug',$slug)->get('routes')->row_array();
+ }
+}
\ No newline at end of file
diff --git a/gocart/helpers/MY_date_helper.php b/gocart/helpers/MY_date_helper.php
index bc2ea917..9b7bfcd8 100644
--- a/gocart/helpers/MY_date_helper.php
+++ b/gocart/helpers/MY_date_helper.php
@@ -27,42 +27,42 @@ function format_date($date){
}
}
-function format_datetime($datetime)
+function reverse_format($date)
{
- $d = explode(' ', format_date($datetime));
-
- $t = $d[2];
-
- $t = explode(':', $t);
-
- $ap = 'am';
- if($t[0] > 12)
+ if(empty($date))
{
- $t[0] = $t[0]-12;
- $ap = 'pm';
+ return;
}
- elseif($t[0] == 0)
+
+ $d = explode('-', $date);
+
+ return "{$d[1]}-{$d[2]}-{$d[0]}";
+}
+
+function format_ymd($date)
+{
+ if(empty($date) || $date == '00-00-0000')
{
- $t[0] = 12;
+ return '';
}
- elseif ($t[0] == 12)
+ else
{
- $ap = 'pm';
+ $d = explode('-', $date);
+ return $d[2].'-'.$d[0].'-'.$d[1];
}
-
- return $d[0].' '.$d[1].', '.$d[3].' at '.$t[0].':'.$t[1].$ap;
}
-function reverse_format($date)
+function format_mdy($date)
{
- if(empty($date))
+ if(empty($date) || $date == '0000-00-00')
{
- return;
+ return '';
+ }
+ else
+ {
+ return date('m-d-Y', strtotime($date));
}
- $d = explode('-', $date);
-
- return "{$d[1]}-{$d[2]}-{$d[0]}";
}
diff --git a/gocart/helpers/MY_download_helper.php b/gocart/helpers/MY_download_helper.php
new file mode 100644
index 00000000..8754c647
--- /dev/null
+++ b/gocart/helpers/MY_download_helper.php
@@ -0,0 +1,118 @@
+config->config['base_url'] = str_replace('http://', 'https://', $CI->config->config['base_url']);
- if (ssl_support() && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off' || $_SERVER['SERVER_PORT'] != 80))
+ if (ssl_support() && (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off'))
{
+ $CI =& get_instance();
+ $CI->config->config['base_url'] = str_replace('http://', 'https://', $CI->config->config['base_url']);
redirect($CI->uri->uri_string());
}
}
@@ -23,12 +23,61 @@ function force_ssl()
if ( ! function_exists('remove_ssl'))
{
function remove_ssl()
- {
- $CI =& get_instance();
- $CI->config->config['base_url'] = str_replace('https://', 'http://', $CI->config->config['base_url']);
- if ($_SERVER['SERVER_PORT'] != 80 || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'))
+ {
+ if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')
{
+ $CI =& get_instance();
+ $CI->config->config['base_url'] = str_replace('https://', 'http://', $CI->config->config['base_url']);
+
redirect($CI->uri->uri_string());
}
}
+}
+
+function theme_url($uri)
+{
+ $CI =& get_instance();
+ return $CI->config->base_url('gocart/themes/'.$CI->config->item('theme').'/'.$uri);
+}
+
+//to generate an image tag, set tag to true. you can also put a string in tag to generate the alt tag
+function theme_img($uri, $tag=false)
+{
+ if($tag)
+ {
+ return '
';
+ }
+ else
+ {
+ return theme_url('assets/img/'.$uri);
+ }
+
+}
+
+function theme_js($uri, $tag=false)
+{
+ if($tag)
+ {
+ return '';
+ }
+ else
+ {
+ return theme_url('assets/js/'.$uri);
+ }
+}
+
+//you can fill the tag field in to spit out a link tag, setting tag to a string will fill in the media attribute
+function theme_css($uri, $tag=false)
+{
+ if($tag)
+ {
+ $media=false;
+ if(is_string($tag))
+ {
+ $media = 'media="'.$tag.'"';
+ }
+ return '';
+ }
+
+ return theme_url('assets/css/'.$uri);
}
\ No newline at end of file
diff --git a/gocart/helpers/credit_card_helper.php b/gocart/helpers/credit_card_helper.php
index 2eeea239..71e7687b 100644
--- a/gocart/helpers/credit_card_helper.php
+++ b/gocart/helpers/credit_card_helper.php
@@ -52,9 +52,10 @@
* @param string The card number to truncate.
* @return string The truncated card number.
*/
-function truncate_card($card_num) {
- $padsize = (strlen($card_num) < 7 ? 0 : strlen($card_num) - 7);
- return substr($card_num, 0, 4) . str_repeat('X', $padsize). substr($card_num, -3);
+function truncate_card($card_num)
+{
+ $padsize = (strlen($card_num) < 7 ? 0 : strlen($card_num) - 7);
+ return substr($card_num, 0, 4) . str_repeat('X', $padsize). substr($card_num, -3);
}
@@ -68,9 +69,10 @@ function truncate_card($card_num) {
* @param integer The expiry year printed on the card.
* @return boolean Returns true if the card is still valid, false if it has expired.
*/
-function card_expiry_valid($month, $year) {
- $expiry_date = mktime(0, 0, 0, ($month + 1), 1, (int) $year);
- return ($expiry_date > time());
+function card_expiry_valid($month, $year)
+{
+ $expiry_date = mktime(0, 0, 0, ($month + 1), 1, (int) $year);
+ return ($expiry_date > time());
}
@@ -80,8 +82,10 @@ function card_expiry_valid($month, $year) {
* @param string The card number to clean up.
* @return string The stripped down card number.
*/
-function card_number_clean($number) {
- return ereg_replace("[^0-9]", "", $number);
+function card_number_clean($number)
+{
+ //updated 11-28-2011 to remove the depreciated ereg function
+ return preg_replace('#[^\d]#', "", $number);
}
@@ -93,25 +97,27 @@ function card_number_clean($number) {
* @return boolean True if valid according to the Luhn algorith, false otherwise.
*/
function card_number_valid ($card_number) {
- $card_number = strrev(card_number_clean($card_number));
- $sum = 0;
+ $card_number = strrev(card_number_clean($card_number));
+ $sum = 0;
- for ($i = 0; $i < strlen($card_number); $i++) {
- $digit = substr($card_number, $i, 1);
-
- // Double every second digit
- if ($i % 2 == 1) {
- $digit *= 2;
- }
-
- // Add digits of 2-digit numbers together
- if ($digit > 9) {
- $digit = ($digit % 10) + floor($digit / 10);
- }
-
- $sum += $digit;
- }
-
- // If the total has no remainder it's OK
- return ($sum % 10 == 0);
+ for ($i = 0; $i < strlen($card_number); $i++)
+ {
+ $digit = substr($card_number, $i, 1);
+
+ // Double every second digit
+ if ($i % 2 == 1) {
+ $digit *= 2;
+ }
+
+ // Add digits of 2-digit numbers together
+ if ($digit > 9)
+ {
+ $digit = ($digit % 10) + floor($digit / 10);
+ }
+
+ $sum += $digit;
+ }
+
+ // If the total has no remainder it's OK
+ return ($sum % 10 == 0);
}
\ No newline at end of file
diff --git a/gocart/helpers/formatting_helper.php b/gocart/helpers/formatting_helper.php
index cd748ee2..963ad9dd 100644
--- a/gocart/helpers/formatting_helper.php
+++ b/gocart/helpers/formatting_helper.php
@@ -1,5 +1,5 @@
address_format))
{
- $formatted = $default;
+ $formatted = $default;
} else {
- $formatted = $c_data->address_format;
+ $formatted = $c_data->address_format;
}
- $formatted = str_replace('{firstname}', $fields['firstname'], $formatted);
- $formatted = str_replace('{lastname}', $fields['lastname'], $formatted);
- $formatted = str_replace('{company}', $fields['company'], $formatted);
+ $formatted = str_replace('{firstname}', $fields['firstname'], $formatted);
+ $formatted = str_replace('{lastname}', $fields['lastname'], $formatted);
+ $formatted = str_replace('{company}', $fields['company'], $formatted);
- $formatted = str_replace('{address_1}', $fields['address1'], $formatted);
- $formatted = str_replace('{address_2}', $fields['address2'], $formatted);
- $formatted = str_replace('{city}', $fields['city'], $formatted);
- $formatted = str_replace('{zone}', $fields['zone'], $formatted);
- $formatted = str_replace('{postcode}', $fields['zip'], $formatted);
- $formatted = str_replace('{country}', $fields['country'], $formatted);
+ $formatted = str_replace('{address_1}', $fields['address1'], $formatted);
+ $formatted = str_replace('{address_2}', $fields['address2'], $formatted);
+ $formatted = str_replace('{city}', $fields['city'], $formatted);
+ $formatted = str_replace('{zone}', $fields['zone'], $formatted);
+ $formatted = str_replace('{postcode}', $fields['zip'], $formatted);
+ $formatted = str_replace('{country}', $fields['country'], $formatted);
// remove any extra new lines resulting from blank company or address line
- $formatted = preg_replace('`[\r\n]+`',"\n",$formatted);
-
- return $formatted;
-
-}
-
-
-// Same as above, except it includes characters used by the jquery selectmenu address selector,
-// also adds email address and phone number to the formatted return string
-function format_address_for_selector($fields)
-{
- if(empty($fields))
+ $formatted = preg_replace('`[\r\n]+`',"\n",$formatted);
+ if($br)
{
- return ;
+ $formatted = nl2br($formatted);
}
+ return $formatted;
- // Default format
- $default = "{firstname} {lastname}\n{company}\n{address_1}\n{address_2}\n{city}, {zone} {postcode}\n{country}";
-
- // Fetch country record to determine which format to use
- $CI = &get_instance();
- $CI->load->model('location_model');
- $c_data = $CI->location_model->get_country($fields['country_id']);
-
- if(empty($c_data->address_format))
- {
- $formatted = $default;
- } else {
- $formatted = $c_data->address_format;
- }
-
- $formatted = str_replace('{firstname}', $fields['firstname'], $formatted);
- $formatted = str_replace("{lastname}\n", $fields['lastname'] . ' - ', $formatted);
- $formatted = str_replace('{company}', $fields['company'], $formatted);
-
- $formatted = str_replace('{address_1}', $fields['address1'], $formatted);
- $formatted = str_replace('{address_2}', $fields['address2'], $formatted);
- $formatted = str_replace('{city}', $fields['city'], $formatted);
- $formatted = str_replace('{zone}', $fields['zone'], $formatted);
- $formatted = str_replace('{postcode}', $fields['zip'], $formatted);
- $formatted = str_replace('{country}', $fields['country'], $formatted);
- // tack on the phone number
- $formatted .= "\n".'('. $fields['phone'] .')';
-
- // remove any extra new lines resulting from blank company or address line
- $formatted = preg_replace('`[\r\n]+`',"\n",$formatted);
-
- // take out the last newline character, but only the last one
- // (I don't like all this reversing, unreversing, but if you can find a better way to replace right-to-left, let me know)
- $formatted = strrev($formatted);
- $formatted = str_replace_once("\n", ' ', $formatted);
- $formatted = strrev($formatted);
-
- // convert new lines to pipe char
- $formatted = str_replace("\n", ' | ', $formatted);
-
- return $formatted;
-}
-
-function str_replace_once($search, $replace, $subject) {
- $firstChar = strpos($subject, $search);
- if($firstChar !== false) {
- $beforeStr = substr($subject,0,$firstChar);
- $afterStr = substr($subject, $firstChar + strlen($search));
- return $beforeStr.$replace.$afterStr;
- } else {
- return $subject;
- }
}
-
function format_currency($value, $symbol=true)
{
- // locale information must be set up for this to return a proper value
- // return money_format(!%i, $value);
-
+
if(!is_numeric($value))
{
return;
@@ -123,14 +59,24 @@ function format_currency($value, $symbol=true)
$neg = '';
}
- $formatted = number_format(abs($value), 2, '.', ',');
-
if($symbol)
{
- $formatted = $neg.$CI->config->item('currency_symbol').$formatted;
+ $formatted = number_format(abs($value), 2, $CI->config->item('currency_decimal'), $CI->config->item('currency_thousands_separator'));
+
+ if($CI->config->item('currency_symbol_side') == 'left')
+ {
+ $formatted = $neg.$CI->config->item('currency_symbol').$formatted;
+ }
+ else
+ {
+ $formatted = $neg.$formatted.$CI->config->item('currency_symbol');
+ }
+ }
+ else
+ {
+ //traditional number formatting
+ $formatted = number_format(abs($value), 2, '.', ',');
}
return $formatted;
-
-}
-
+}
\ No newline at end of file
diff --git a/gocart/helpers/utility_helper.php b/gocart/helpers/utility_helper.php
deleted file mode 100644
index fc8936ec..00000000
--- a/gocart/helpers/utility_helper.php
+++ /dev/null
@@ -1,52 +0,0 @@
-0)
- {
- foreach(array_keys($array) as $key)
- $temp[$key]=$array[$key][$index];
- if(!$natsort)
- ($order=='asc')? asort($temp) : arsort($temp);
- else
- {
- ($case_sensitive)? natsort($temp) : natcasesort($temp);
- if($order!='asc')
- $temp=array_reverse($temp,TRUE);
- }
- foreach(array_keys($temp) as $key)
- (is_numeric($key))? $sorted[]=$array[$key] : $sorted[$key]=$array[$key];
- return $sorted;
- }
- return $array;
-}
-
-//this tests for IE < 9 since IE9 supports the Canvas tag properly
-function is_ie($version = 9)
-{
- if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)
- {
- $browser = explode(';', $_SERVER['HTTP_USER_AGENT']);
- foreach ($browser as $b)
- {
- if (strpos($b, 'MSIE') !== false)
- {
- $test = explode(' ', $b);
- }
- }
-
- if($test[2] < $version)
- {
- return true;
- }
- else
- {
- return false;
- }
-
- }
- else
- {
- return false;
- }
-}
\ No newline at end of file
diff --git a/gocart/language/english/admin_common_lang.php b/gocart/language/english/admin_common_lang.php
new file mode 100644
index 00000000..00725fde
--- /dev/null
+++ b/gocart/language/english/admin_common_lang.php
@@ -0,0 +1,40 @@
+You did not select a file to upload.'; //important. This must match the same error as generated by the file upload script of your language.
+$lang['message_delete_category'] = 'The category has been deleted.';
+$lang['current_file'] = 'Current File';
+$lang['confirm_delete_category'] = 'Are you sure you want to delete this category?';
+$lang['add_new_category'] = 'Add New Category';
+$lang['no_categories'] = 'There are currently no categories';
+$lang['attributes'] = 'Attributes';
+$lang['seo'] = 'SEO';
+$lang['parent'] = 'Parent';
+$lang['meta_data_description'] = 'ex. <meta name="description" content="We sell products that help you" />';
+$lang['drag_and_drop'] = 'Drag and drop the products in the order you would like them to appear.';
+$lang['sku'] = 'SKU';
+$lang['price'] = 'Price';
+$lang['sale'] = 'Sale';
+$lang['max_file_size'] = 'Max File Size';
\ No newline at end of file
diff --git a/gocart/language/english/common_lang.php b/gocart/language/english/common_lang.php
new file mode 100644
index 00000000..bc72a5ef
--- /dev/null
+++ b/gocart/language/english/common_lang.php
@@ -0,0 +1,251 @@
+To: %s';
+
+$lang['email'] = 'Email';
+$lang['password'] = 'Password';
+$lang['return_to_login'] = 'Return to Login';
+$lang['forgot_password'] = 'Forgot Password';
+$lang['keep_me_logged_in'] = 'Keep me logged in!';
+$lang['register'] = 'Register';
+$lang['login_failed'] = 'Authentication Failed!';
+$lang['go_to_login'] = 'Go to Login';
+
+$lang['account_registration'] = 'Account Registration';
+$lang['registration_thanks'] = 'Thanks for registering %s!';
+$lang['error_email'] = 'The requested email is already in use.';
+$lang['error_no_account_record'] = 'There is no record of your account.';
+$lang['message_new_password'] = 'A new password has been generated and sent to your email.';
+$lang['message_account_updated'] = 'Your account has been updated';
+
+$lang['error_invalid_shipping_method'] = 'Please select a valid shipping method.';
+$lang['delete_address_confirmation'] = 'Are you sure you want to delete this address?';
+$lang['error_must_have_address'] = 'You Must leave at least 1 address in the Address Manager.';
+$lang['account_information'] = 'Account Information';
+$lang['account_company'] = 'Company';
+$lang['account_firstname'] = 'First Name';
+$lang['account_lastname'] = 'Last Name';
+$lang['account_email'] = 'Email';
+$lang['account_phone'] = 'Phone';
+$lang['account_password'] = 'Password';
+$lang['account_confirm'] = 'Confirm Password';
+$lang['account_newsletter_subscribe'] = 'Subscribe to our email list';
+$lang['account_password_instructions'] = 'If you do not wish to change your
password, leave both fields blank.';
+$lang['default_billing'] = 'Default Billing';
+$lang['default_shipping'] = 'Default Shipping';
+$lang['order_history'] = 'Order History';
+$lang['order_date'] = 'Ordered On';
+$lang['order_number'] = 'Order Number';
+$lang['order_status'] = 'Status';
+$lang['add_address'] = 'Add Address';
+$lang['no_order_history'] = 'You have no orders in your account history.';
+
+//cart library messages
+$lang['coupon_not_apply'] = 'The coupon code you entered does not apply to any products in your cart.';
+$lang['coupon_applied'] = 'The coupon has been applied to your products.';
+$lang['coupon_invalid'] = 'Sorry, but the coupon you entered is not valid at this time.';
+$lang['coupon_already_applied'] = 'That coupon code has already been applied to your items.';
+$lang['invalid_coupon_code'] = 'There was no coupon with that code. Check to make sure you entered it correctly.';
+$lang['giftcard_balance_applied'] = 'You should see your card balance displayed.';
+$lang['giftcard_zero_balance'] = 'Sorry, but the gift card you entered is expired or has a zero balance.';
+$lang['giftcard_not_exist'] = 'The gift card code you entered does not exist.';
+$lang['giftcard_already_applied'] = 'Your gift card is already applied';
+$lang['error_updating_cart'] = 'There was an error updating the cart!';
+$lang['not_enough_stock'] = 'The quantity requested for the "%s" product could not be added. We only have %d item(s) in stock.';
+$lang['remove_item'] = 'Are you sure you want to remove this item from your cart?';
diff --git a/gocart/language/english/coupon_lang.php b/gocart/language/english/coupon_lang.php
new file mode 100644
index 00000000..790a5b7d
--- /dev/null
+++ b/gocart/language/english/coupon_lang.php
@@ -0,0 +1,36 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin Common Language
+******************************************/
+
+//header
+$lang['common_sales'] = 'Vendas';
+$lang['common_orders'] = 'Pedidos';
+$lang['common_customers'] = 'Clientes';
+$lang['common_groups'] = 'Grupos';
+$lang['common_reports'] = 'Relatórios';
+$lang['common_coupons'] = 'Cupons';
+$lang['common_giftcards'] = 'Vale Presente';
+$lang['common_catalog'] = 'Catalogo';
+$lang['common_categories'] = 'Categorias';
+$lang['common_products'] = 'Produtos';
+$lang['common_digital_products'] = 'Produtos Digitais';
+$lang['common_content'] = 'Conteúdo';
+$lang['common_banners'] = 'Banners';
+$lang['common_boxes'] = 'Caixas de Informação';
+$lang['common_pages'] = 'Paginas';
+$lang['common_administrative'] = 'Administrativo';
+$lang['common_settings'] = 'Configurações';
+$lang['common_locations'] = 'Localizações';
+$lang['common_administrators'] = 'Administradores';
+$lang['common_note'] = 'Notas';
+$lang['common_alert'] = 'Alerta';
+$lang['common_log_out'] = 'Sair';
+$lang['common_front_end'] = 'Frente da Loja';
+$lang['common_dashboard'] = 'Painel de Controle';
+$lang['common_home'] = 'Home';
+$lang['common_actions'] = 'Ações';
+
+//buttons
+$lang['save'] = 'Salvar';
+$lang['edit'] = 'Editar';
+$lang['delete'] = 'Apagar';
+$lang['search'] = 'Procurar';
+$lang['toggle_wysiwyg'] = 'Editor de texto';
\ No newline at end of file
diff --git a/gocart/language/pt-br/admin_lang.php b/gocart/language/pt-br/admin_lang.php
new file mode 100644
index 00000000..2fd35d5a
--- /dev/null
+++ b/gocart/language/pt-br/admin_lang.php
@@ -0,0 +1,29 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiros
+Admin Administrator Management Language
+******************************************/
+
+$lang['admins'] = 'Administradores';
+$lang['admin_form'] = 'Formulário de Administradores';
+$lang['add_new_admin'] = 'Adicionar um Administrador';
+$lang['error_self_delete'] = 'Não pode apagar você mesmo';
+$lang['admin_not_found'] = 'O administrador solicitado não pôde ser encontrado';
+$lang['firstname'] = 'Primeiro nome';
+$lang['lastname'] = 'Sobrenome';
+$lang['email'] = 'E-mail';
+$lang['access'] = 'Acesso';
+$lang['password'] = 'Senha';
+$lang['confirm_password'] = 'Confirmar senha';
+$lang['message_user_saved'] = 'O administrador foi salvo!';
+$lang['message_user_deleted'] = 'O administrador foi apagado.';
+$lang['error_email_taken'] = 'O e-mail solicitado já está em uso.';
+$lang['information'] = 'Informação';
+$lang['confirm_delete'] = 'Você tem certeza que quer apagar este administrador?';
\ No newline at end of file
diff --git a/gocart/language/pt-br/banner_lang.php b/gocart/language/pt-br/banner_lang.php
new file mode 100644
index 00000000..d422cdcf
--- /dev/null
+++ b/gocart/language/pt-br/banner_lang.php
@@ -0,0 +1,30 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin Banner Language
+******************************************/
+
+$lang['banners'] = 'Banners';
+$lang['title'] = 'Titulo';
+$lang['link'] = 'Link';
+$lang['enable_on'] = 'Inicio da publicação';
+$lang['disable_on'] = 'Fim da publicação';
+$lang['new_window'] = 'Pop-up';
+$lang['image'] = 'Imagem';
+$lang['current_file'] = 'Arquivo atual';
+$lang['confirm_delete_banner'] = 'Tem certeza que quer apagar este banner?';
+$lang['add_new_banner'] = 'Adicionar novo Banner';
+$lang['no_banners'] = 'Sem banners cadastrados';
+$lang['message_banner_saved'] = 'O banner foi salvo!';
+$lang['date_error'] = 'A data de "Fim da publicação" não pode ser anterior a data de "Inicio da publicação.';
+$lang['banner_form'] = 'Formulário de Banner';
+$lang['message_delete_banner'] = 'O banner foi excluÃdo.';
+$lang['sort'] = 'Ordem';
+$lang['sort_banners'] = 'Os Banners foram ordenados! Basta arrastar e soltá-los na ordem que você gostaria que eles apareçam.';
\ No newline at end of file
diff --git a/gocart/language/pt-br/boxes_lang.php b/gocart/language/pt-br/boxes_lang.php
new file mode 100644
index 00000000..934984c7
--- /dev/null
+++ b/gocart/language/pt-br/boxes_lang.php
@@ -0,0 +1,31 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin Boxes Language
+******************************************/
+
+$lang['boxes'] = 'Caixas de Informação';
+$lang['box_info'] = 'Caixa de Informação';
+$lang['title'] = 'TÃtulo';
+$lang['link'] = 'Link';
+$lang['enable_on'] = 'Inicio da publicação';
+$lang['disable_on'] = 'Fim da publicação';
+$lang['new_window'] = 'Pop-up';
+$lang['image'] = 'Imagem';
+$lang['current_file'] = 'Arquivo atual';
+$lang['confirm_delete_box'] = 'Você tem certeza que quer apagar esta caixa?';
+$lang['add_new_box'] = 'Adicionar nova Caixa';
+$lang['no_boxes'] = 'Não existe caixas cadastrados';
+$lang['message_box_saved'] = 'A caixa foi salva!';
+$lang['date_error'] = 'A data de "Fim da publicação" não pode ser anterior a data de "Inicio da publicação.';
+$lang['box_form'] = 'Formulário de Caixa de Informação';
+$lang['message_delete_box'] = 'A caixa foi excluÃda.';
+$lang['sort'] = 'Ordem';
+$lang['sort_boxes'] = 'As Boxes foram ordenados! Basta arrastar e soltá-los na ordem que você gostaria que eles apareçam.';
\ No newline at end of file
diff --git a/gocart/language/pt-br/category_lang.php b/gocart/language/pt-br/category_lang.php
new file mode 100644
index 00000000..e2ee9ece
--- /dev/null
+++ b/gocart/language/pt-br/category_lang.php
@@ -0,0 +1,44 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin Category Language
+******************************************/
+
+$lang['categories'] = 'Categorias';
+$lang['error_must_select'] = 'Você deve selecionar uma categoria para organizar';
+$lang['error_not_found'] = 'A categoria solicitada não pôde ser encontrado.';
+$lang['organize_category'] = 'Organize "%s" Categoria';
+$lang['organize'] = 'Organize';
+$lang['category_id'] = 'ID';
+$lang['category_form'] = 'Formulário da Categoria';
+$lang['name'] = 'Nome';
+$lang['slug'] = 'Amigável';
+$lang['description'] = 'Descrição';
+$lang['excerpt'] = 'Resumo';
+$lang['sequence'] = 'Sequência';
+$lang['image'] = 'Imagem';
+$lang['seo_title'] = 'TÃtulo SEO';
+$lang['meta'] = 'Meta Data';
+$lang['message_category_saved'] = 'A categoria foi salva!';
+$lang['error_file_upload'] = 'Você não selecionou um arquivo para Envio.
'; # Importante! Isso deve corresponder o mesmo erro gerado pelo script de upload de arquivos do seu idioma.
+$lang['message_delete_category'] = 'A categoria foi excluÃda.';
+$lang['current_file'] = 'Arquivo corrente.';
+$lang['confirm_delete_category'] = 'Tem certeza de que deseja apagar esta categoria?';
+$lang['add_new_category'] = 'Adicionar nova Categoria';
+$lang['no_categories'] = 'Atualmente não existem categorias';
+$lang['attributes'] = 'Atributos';
+$lang['seo'] = 'SEO';
+$lang['parent'] = 'Parentesco';
+$lang['meta_data_description'] = 'ex. <meta name="descrição" content="Nós vendemos produtos para ajudar você." />';
+$lang['drag_and_drop'] = 'Arraste e solte os produtos na ordem que você gostaria que eles apareçam.';
+$lang['sku'] = 'Cod.';
+$lang['price'] = 'Preço';
+$lang['sale'] = 'Venda';
+$lang['max_file_size'] = 'Tamanho máximo do arquivo';
\ No newline at end of file
diff --git a/gocart/language/pt-br/common_lang.php b/gocart/language/pt-br/common_lang.php
new file mode 100644
index 00000000..0bab7b11
--- /dev/null
+++ b/gocart/language/pt-br/common_lang.php
@@ -0,0 +1,257 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+
+Português brasileiro
+Common Language
+
+******************************************/
+
+
+
+
+/*******************
+
+Frente da Loja
+
+*******************/
+
+//common terms
+$lang['login'] = 'Login';
+$lang['logout'] = 'Sair';
+$lang['my_account'] = 'Minha Conta';
+$lang['my_downloads'] = 'Meus Downloads';
+$lang['enabled'] = 'Habilitado';
+$lang['disabled'] = 'Desabilitado';
+$lang['mode'] = 'Modo';
+$lang['currency'] = 'Moeda';
+$lang['active'] = 'Ativo';
+$lang['yes'] = 'Sim';
+$lang['no'] = 'Não';
+$lang['download_link'] = 'Clique aqui para acessar seus downloads!';
+$lang['catalog'] = 'Catálogo';
+$lang['account'] = 'Conta';
+$lang['close'] = 'Fechar';
+
+$lang['empty_cart'] = 'Seu carrinho esta vazio';
+$lang['single_item'] = 'Existe %d item no seu carrinho';
+$lang['multiple_items'] = 'Existem %d itens no seu carrinho';
+$lang['empty_view_cart'] = 'Não tem nenhum item seu carrinho!';
+$lang['your_cart'] = 'Seu carrinho de compra';
+
+$lang['on_sale'] = 'Por';
+$lang['related_products_title'] = 'Você também pode gostar...';
+$lang['form_submit'] = 'Enviar';
+$lang['form_register'] = 'Cadastrar';
+$lang['form_login'] = 'Login';
+$lang['reset_password'] = 'Restaurar senha';
+$lang['form_search'] = 'Encontre';
+$lang['form_cancel'] = 'Cancela';
+$lang['form_add_to_cart'] = 'Adicionar ao carrinho';
+$lang['form_update_cart'] = 'Atualizar carrinho';
+$lang['form_checkout'] = 'Confira';
+$lang['form_continue'] = 'Continue';
+$lang['form_choose'] = 'Escolher';
+$lang['form_edit'] = 'Editar';
+$lang['form_delete'] = 'Excluir';
+$lang['form_search'] = 'Buscar';
+$lang['form_view'] = 'Visualizar';
+$lang['form_save'] = 'Salvar';
+$lang['form_from'] = 'De';
+$lang['form_to'] = 'para';
+
+$lang['step_1'] = 'Primeiro passo';
+$lang['step_2'] = 'Segundo passo';
+$lang['free_shipping_basic'] = 'Frete Grátis (básico)';
+
+$lang['search'] = 'Encontrar';
+$lang['search_error'] = 'Não foi possÃvel encontrar com o termo usado!';
+$lang['amount'] = 'Quantidade';
+$lang['custom_amount'] = 'Personalizar quantidade';
+$lang['preset_amount'] = 'Quantidade atual';
+$lang['recipient_name'] = 'Nome do destinatário';
+$lang['recipient_email'] = 'E-mail do destinatário';
+$lang['sender_email'] = 'E-mail remetente';
+$lang['custom_greeting'] = 'Saudação personalizada';
+$lang['check_out'] = 'Confira';
+
+$lang['sort_by_name_asc'] = 'Ordenar por nome A a Z';
+$lang['sort_by_name_desc'] = 'Ordenar por nome Z a A';
+$lang['sort_by_price_asc'] = 'Ordenar por menor preço';
+$lang['sort_by_price_desc'] = 'Ordenar por maior preço';
+
+$lang['products'] = 'Produtos';
+$lang['out_of_stock'] = 'Fora de estoque';
+$lang['no_products'] = 'Não existem produtos ainda nesta categoria.';
+$lang['no_image_available'] = 'Sem imagem relacionada';
+$lang['product_reg'] = 'de ';
+$lang['product_price'] = 'Preço:';
+$lang['product_sale'] = 'Somente ';
+$lang['available_options'] = 'Opções disponÃveis';
+$lang['choose_option'] = 'Escolha uma opção';
+$lang['tab_description'] = 'Descrição';
+$lang['tab_related_products'] = 'Produtos relacionados';
+$lang['subcategories'] = 'Sub-categorias';
+
+$lang['loading'] = 'Carregando…';
+$lang['coupon_label'] = 'Se você tem um cupom, digite o código aqui:';
+$lang['gift_card_label'] = 'Se você tem um vale presente, digite o código aqui:';
+$lang['apply_gift_card'] = 'Usar vale presente';
+$lang['apply_coupon'] = 'Usar cupom de desconto';
+$lang['customer_information'] = 'Informação ao Cliente';
+$lang['error_save_payment'] = 'Houve um problema em salvar o seu método de pagamento';
+$lang['error_choose_payment'] = 'Por favor escolha uma forma de pagamento';
+$lang['error_choose_shipping'] = 'Por favor escolha um método de envio';
+$lang['continue_shopping'] = 'Continuar comprando';
+$lang['register_now'] = 'Registre-se';
+$lang['submit_order'] = 'Finalizar compra';
+$lang['edit_customer_information'] = 'Editar Informações ao Cliente';
+$lang['communication_error'] = 'Houve um problema inesperado comunicação com o servidor.';
+$lang['no_payment_needed'] = 'Não há pagamento necessário.';
+$lang['choose_payment_method'] = 'Escolha o modo de pagamento';
+$lang['shipping_method'] = 'Método de envio';
+$lang['no_shipping_needed'] = 'Seu pedido não inclui todos os itens que necessitam de transporte.';
+$lang['payment_information'] = 'Informações sobre pagamento';
+$lang['payment_method'] = 'Forma de Pagamento';
+$lang['submit_payment_method'] = 'Enviar forma de pagamento';
+$lang['product_information'] = 'Informação do produto';
+$lang['price_and_quantity'] = 'Preço & Quantidade';
+$lang['sku'] = 'Cod.';
+$lang['name'] = 'Nome';
+$lang['price'] = 'Preço';
+$lang['description'] = 'Descrição';
+$lang['quantity'] = 'Quantidade';
+$lang['totals'] = 'Totais';
+$lang['group_discount'] = 'Desconto para Grupos';
+$lang['subtotal'] = 'Subtotal';
+$lang['cart_total'] = 'Total';
+$lang['coupon_discount'] = 'Cupom de desconto';
+$lang['gift_card_discount'] = 'Vale-presente';
+$lang['discounted_subtotal'] = 'Desconto Subtotal';
+$lang['shipping'] = 'Frete';
+$lang['tax'] = 'Imposto';
+$lang['taxes'] = 'Impostos';
+$lang['grand_total'] = 'Valor final';
+$lang['address_manager'] = 'Endereço principal';
+$lang['address_form'] = 'Formulário de endereço';
+$lang['your_addresses'] = 'Seu endereço';
+$lang['address_button'] = 'Mudar endereço';
+$lang['shipping_address_button'] = 'Alterar endereço de entrega';
+$lang['billing_address_button'] = 'Alterar endereço de cobrança';
+$lang['shipping_method_button'] = 'Alterar método de envio';
+$lang['billing_method_button'] = 'Alterar método de cobrança';
+$lang['shipping_and_billing'] = 'Informações de Frete & Cobrança';
+$lang['billing_address'] = 'Endereço de cobrança';
+$lang['choose_billing_address'] = 'Escolha seu endereço de cobrança';
+$lang['use_address_for_shipping'] = 'Utilize este endereço para envio';
+$lang['shipping_address'] = 'Endereço para envio';
+$lang['shipping_information'] = 'Informações de Envio';
+$lang['billing_information'] = 'Informações de cobrança';
+$lang['choose_shipping_address'] = 'Escolha seu endereço de entrega';
+$lang['choose_address'] = 'Escolha o endereço';
+$lang['ship_to_address'] = 'Enviar para este endereço';
+$lang['contact_info'] = 'Informações de contato';
+$lang['address_company'] = 'Empresa';
+$lang['address'] = 'Endereço';
+$lang['address1'] = 'Endereço 1';
+$lang['address2'] = 'Endereço 2';
+$lang['address_firstname'] = 'Primeiro nome';
+$lang['address_lastname'] = 'Sobrenome';
+$lang['address_email'] = 'E-mail';
+$lang['address_phone'] = 'Telefone / Celular';
+$lang['address_city'] = 'Cidade';
+$lang['address_postcode'] = 'CEP';
+$lang['address_country'] = 'PaÃs';
+$lang['address_state'] = 'Estado';
+$lang['message_address_saved'] = 'Seu endereço foi salvo com sucesso!';
+
+$lang['default'] = 'Padrão';
+$lang['additional_order_details'] = 'Detalhes adicionais do pedido';
+$lang['additional_details'] = 'Detalhes adicionais';
+$lang['heard_about'] = 'Como você ficou sabendo sobre nós?';
+$lang['shipping_instructions'] = 'Informação de frete';
+
+//checkout confirmation
+$lang['thank_you'] = 'Obrigado pela sua compra! '; // terminates with company/site name, defined in gocart config as 'company_name'
+
+//authorize.net library messages
+$lang['please_fix_errors'] = 'Por favor, corrija os seguintes erros:';
+$lang['enter_card_name'] = 'Digite seu nome como aparece no cartão';
+$lang['invalid_card_exp'] = 'A data de validade não parece ser válido';
+$lang['invalid_card_num'] = 'O número do cartão que você digitou não é um número válido de cartão de crédito';
+$lang['enter_card_code'] = 'Por favor insira o código de segurança de três dÃgitos no verso do cartão';
+$lang['transaction_declined'] = 'Transação recusada. Por favor, verifique as informações do cartão e tente novamente.';
+$lang['enter_test_mode_credentials'] = 'Você deve digitar os valores de login para o modo TESTE';
+$lang['enter_live_mode_credentials'] = 'Você deve digitar os valores de login para o modo LIVE';
+$lang['all_required_fields'] = 'Por favor, preencha todos os campos obrigatórios.';
+$lang['card_number'] = 'Número do Cartão de Crédito';
+$lang['expires_on'] = 'Validade';
+$lang['cvv_code'] = 'Código CVV';
+
+//giftcards
+$lang['giftcard'] = 'Vale-presente';
+$lang['giftcard_choose_amount'] = 'Escolha a quantidade de Vale-presente';
+$lang['giftcard_custom_amount'] = 'Personalizar quantidade';
+$lang['giftcard_to'] = 'Para (Nome)';
+$lang['giftcard_email'] = 'Para (E-mail)';
+$lang['giftcard_from'] = 'De';
+$lang['giftcard_message'] = 'Mensagem personalizada';
+$lang['giftcard_excerpt'] = 'Vale-presente para um amigo(a)
Para: %s';
+
+$lang['email'] = 'E-mail';
+$lang['password'] = 'Senha';
+$lang['return_to_login'] = 'Voltar ao Login';
+$lang['forgot_password'] = 'Esqueci minha senha';
+$lang['keep_me_logged_in'] = 'Mantenha-me conectado!';
+$lang['register'] = 'Registrar';
+$lang['login_failed'] = 'Erro ao entrar!';
+$lang['go_to_login'] = 'Vá ao Login';
+
+$lang['account_registration'] = 'Cadastro';
+$lang['registration_thanks'] = 'Obrigado por se cadastrar %s!';
+$lang['error_email'] = 'O e-mail solicitado já está em uso.';
+$lang['error_no_account_record'] = 'Não há registro de sua conta.';
+$lang['message_new_password'] = 'Uma nova senha foi gerada e enviada para o seu e-mail.';
+$lang['message_account_updated'] = 'Sua conta foi atualizada';
+
+$lang['error_invalid_shipping_method'] = 'Por favor selecione um método de envio válido.';
+$lang['delete_address_confirmation'] = 'Tem certeza de que quer apagar este endereço?';
+$lang['error_must_have_address'] = 'Você deve deixar pelo menos um endereço no Endereço principal.';
+$lang['account_information'] = 'Informações da Conta';
+$lang['account_company'] = 'Empresa';
+$lang['account_firstname'] = 'Primeiro nome';
+$lang['account_lastname'] = 'Sobrenome';
+$lang['account_email'] = 'E-mail';
+$lang['account_phone'] = 'Telefone / Celular';
+$lang['account_password'] = 'Senha';
+$lang['account_confirm'] = 'confirme sua senha';
+$lang['account_newsletter_subscribe'] = 'Assine nossa lista de E-mail';
+$lang['account_password_instructions'] = 'Se você não quiser alterar sua senha
, deixar ambos os campos em branco.';
+$lang['default_billing'] = 'Pagamento padrão';
+$lang['default_shipping'] = 'Envio padrão';
+$lang['order_history'] = 'Histórico de pedidos';
+$lang['order_date'] = 'Solicitado em';
+$lang['order_number'] = 'Numero de pedido';
+$lang['order_status'] = 'Situação';
+$lang['add_address'] = 'Adicionar endereço';
+$lang['no_order_history'] = 'Você não tem pedidos em seu histórico de conta.';
+
+//cart library messages
+$lang['coupon_not_apply'] = 'O código de cupom que você digitou não se aplica a quaisquer produtos em seu carrinho.';
+$lang['coupon_applied'] = 'O cupom foi aplicado em seus produtos.';
+$lang['coupon_invalid'] = 'Desculpe, mas o cupom que você digitou não é válido neste momento.';
+$lang['coupon_already_applied'] = 'Esse código de cupom já foi aplicada aos seus itens.';
+$lang['invalid_coupon_code'] = 'Não houve cupom com esse código. Verifique se você digitou corretamente.';
+$lang['giftcard_balance_applied'] = 'Você deve consultar o seu saldo do cartão exibido.';
+$lang['giftcard_zero_balance'] = 'Desculpe, mas o vale-presente está expirado ou tem um saldo zero.';
+$lang['giftcard_not_exist'] = 'O código de vale-presente que você digitou não existe.';
+$lang['giftcard_already_applied'] = 'O seu vale-presente já foi usado';
+$lang['error_updating_cart'] = 'Houve um erro ao atualizar o carrinho!';
+$lang['not_enough_stock'] = 'A quantidade solicitada para o produto "%s" não pode ser adicionado. Nós só temos %d item (s) em estoque.';
+$lang['remove_item'] = 'Tem certeza de que deseja remover este item do seu carrinho?';
diff --git a/gocart/language/pt-br/coupon_lang.php b/gocart/language/pt-br/coupon_lang.php
new file mode 100644
index 00000000..f76ca959
--- /dev/null
+++ b/gocart/language/pt-br/coupon_lang.php
@@ -0,0 +1,43 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin Coupon Language
+******************************************/
+
+$lang['coupons'] = 'Cupons';
+$lang['coupon_form'] = 'Formulário de Cupons';
+$lang['error_not_found'] = 'O cupom solicitada não pôde ser encontrado.';
+$lang['no_coupons'] = 'Atualmente não existem cupons.';
+$lang['confirm_delete_coupon'] = 'Tem certeza de que deseja excluir este cupom?';
+$lang['add_new_coupon'] = 'Adicionar novo cupom';
+$lang['code'] = 'Código';
+$lang['max_uses'] = 'Uso máximo';
+$lang['whole_order_discount'] = 'Desconto na compra toda?';
+$lang['reduction_target'] = 'Meta de redução';
+$lang['reduction_type'] = 'Tipo de redução';
+$lang['reduction_amount'] = 'Quantidade de redução';
+$lang['start_date'] = 'Data de inicio';
+$lang['end_date'] = 'Data final';
+$lang['message_saved_coupon'] = 'O cupom foi salvo!';
+$lang['error_already_used'] = 'O código de cupom solicitado já está em uso!';
+$lang['message_coupon_deleted'] = 'O cupom foi apagado com sucesso.';
+$lang['attributes'] = 'Atributos';
+$lang['applies_to'] = 'Aplicado a';
+$lang['coupon_code'] = 'Código do cupom';
+$lang['times_used'] = 'Este cupom foi usado %d vezes.';
+$lang['limit_per_order'] = 'Limite por compra';
+$lang['enable_on'] = 'Data inicio';
+$lang['disable_on'] = 'Data final';
+$lang['coupon_type'] = 'Tipo de cupom';
+$lang['price_discount'] = 'Valor do desconto';
+$lang['free_shipping'] = 'Frete grátis';
+$lang['apply_to_whole_order'] = 'Aplicar cupom de toda compra';
+$lang['apply_to_select_items'] = 'Aplicar cupom nos itens selecionados';
+$lang['usage'] = 'Usado';
\ No newline at end of file
diff --git a/gocart/language/pt-br/customer_lang.php b/gocart/language/pt-br/customer_lang.php
new file mode 100644
index 00000000..7f9a7ea4
--- /dev/null
+++ b/gocart/language/pt-br/customer_lang.php
@@ -0,0 +1,65 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin Customer Language
+******************************************/
+
+$lang['customers'] = 'Clientes';
+$lang['customer_form'] = 'Formulário de cliente';
+$lang['firstname'] = 'Primeiro nome';
+$lang['lastname'] = 'Sobrenome';
+$lang['email'] = 'E-mail';
+$lang['phone'] = 'Telefone / Celular';
+$lang['contact'] = 'Contato';
+$lang['locality'] = 'Localização';
+$lang['company'] = 'Empresa';
+$lang['active'] = 'Ativo';
+$lang['email_subscribed'] = 'E-mail inscrito';
+$lang['password'] = 'Senha';
+$lang['confirm_password'] = 'Confirma senha';
+$lang['confirm'] = 'Confirma';
+$lang['group_name'] = 'Nome do grupo';
+$lang['discount'] = 'Desconto';
+$lang['discount_type'] = 'Tipo de desconto';
+$lang['address'] = 'Endereço';
+$lang['city'] = 'Cidade';
+$lang['country'] = 'PaÃs';
+$lang['state'] = 'Estado';
+$lang['postcode'] = 'CEP';
+$lang['address_information'] = 'Informação de endereço';
+$lang['customer_information'] = 'Outras informações';
+$lang['addresses_for'] = 'Endereço para %s';
+$lang['addresses'] = 'Endereços';
+$lang['customer_groups'] = 'Grupo de clientes';
+$lang['group'] = 'Grupo';
+$lang['group_name'] = 'Nome do grupo';
+$lang['customer_group_form'] = 'Formulário de Grupos de clientes';
+$lang['address_form'] = 'Formulário de endereço';
+$lang['attributes'] = 'Atributos';
+$lang['xml_download'] = 'Exportar clientes (XML)';
+$lang['subscriber_download'] = 'Lista dos E-mails (CSV)';
+$lang['no_addresses'] = 'Atualmente não existem endereços para este cliente.';
+$lang['no_customers'] = 'Atualmente não há cliente.';
+$lang['message_saved_group'] = 'O grupo de clientes foi salvo.';
+$lang['message_saved_customer'] = 'O cliente foi salvo.';
+$lang['message_saved_address'] = 'O endereço foi salvo.';
+$lang['message_customer_deleted'] = 'O cliente foi excluÃdo.';
+$lang['message_address_deleted'] = 'O endereço foi excluÃdo.';
+
+$lang['error_not_found'] = 'O cliente solicitado não pôde ser encontrado.';
+$lang['error_address_not_found'] = 'O endereço solicitado não pôde ser encontrado.';
+$lang['error_email_in_use'] = 'O e-mail solicitado já está em uso.';
+
+$lang['confirm_delete_address'] = 'Tem certeza de que quer apagar este endereço?';
+$lang['confirm_delete_group'] = 'Tem certeza de que deseja excluir este grupo?';
+$lang['confirm_delete_customer'] = 'Tem certeza de que deseja excluir este cliente?';
+$lang['add_new_address'] = 'Adicionar novo endereço';
+$lang['add_new_group'] = 'Adicionar novo grupo';
+$lang['add_new_customer'] = 'Adicionar um novo cliente';
diff --git a/gocart/language/pt-br/dashboard_lang.php b/gocart/language/pt-br/dashboard_lang.php
new file mode 100644
index 00000000..b6d6b50b
--- /dev/null
+++ b/gocart/language/pt-br/dashboard_lang.php
@@ -0,0 +1,32 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin Dashboard Language
+******************************************/
+
+$lang['dashboard'] = 'Painel';
+$lang['order_number'] = 'Número de pedidos';
+$lang['bill_to'] = 'Cobrança para';
+$lang['ship_to'] = 'Enviar para';
+$lang['ordered_on'] = 'Solicitado em';
+$lang['status'] = 'Situação';
+$lang['firstname'] = 'Nome';
+$lang['lastname'] = 'Sobrenome';
+$lang['email'] = 'E-mail';
+$lang['active'] = 'Ativo';
+$lang['yes'] = 'Sim';
+$lang['no'] = 'Não';
+$lang['recent_orders'] = 'Pedidos recentes';
+$lang['recent_customers'] = 'Clientes recentes';
+$lang['view_all_orders'] = 'Ver todos os pedidos';
+$lang['view_all_customers'] = 'Ver todos os clientes';
+
+$lang['no_shipping_module_installed'] = 'Não há nenhum módulo de transporte atualmente instalada. Isso impede que os clientes comprem corretamente.';
+$lang['no_payment_module_installed'] = 'Não há módulo de pagamento instalado atualmente. Isso impede que os clientes comprem corretamente.';
\ No newline at end of file
diff --git a/gocart/language/pt-br/digital_product_lang.php b/gocart/language/pt-br/digital_product_lang.php
new file mode 100644
index 00000000..54b95611
--- /dev/null
+++ b/gocart/language/pt-br/digital_product_lang.php
@@ -0,0 +1,41 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin Dashboard Language
+******************************************/
+
+$lang['dgtl_pr_header'] = 'Arquivo de Produtos Digitais';
+
+$lang['confirm_delete_file'] = 'Aviso: A exclusão de um arquivo que está associado a um produto ativo irá desativar automaticamente sua disponibilidade.';
+$lang['path_error'] = 'Seu caminho de envio do arquivo não é gravável. Por favor, verifique as permissões da sua pasta antes que você pode fazer upload de qualquer coisa.';
+$lang['message_deleted_file'] = 'O arquivo foi apagado.';
+
+$lang['add_file'] = 'Adicionar arquivo';
+$lang['digital_products_form'] = 'Formulário de Produtos Digitais';
+$lang['file_label'] = 'Escolha o arquivo';
+$lang['version'] = 'Versão';
+$lang['max_downloads'] = 'Máximo de Downloads';
+$lang['max_downloads_note'] = '(Downloads máximo por compra - 0 para ilimitado)';
+$lang['filename'] = 'Nome do arquivo';
+$lang['title'] = 'TÃtulo';
+$lang['size'] = 'Tamanho do arquivo';
+$lang['avail'] = 'Avaliado';
+$lang['no_files'] = 'Não há arquivos';
+
+$lang['download_limit'] = 'Downloads restante(s)';
+$lang['no_downloads'] = 'Você não tem downloads disponÃveis.';
+$lang['no_max'] = 'N/A';
+$lang['max_exceeded'] = 'Downloads máximo excedido';
+
+$lang['download_btn'] = 'Download';
+
+$lang['attributes'] = 'Atributos';
+
+$lang['missing_file_msg'] = 'Este arquivo não esta disponÃvel para Download no momento. Retorne mais tarde.';
\ No newline at end of file
diff --git a/gocart/language/pt-br/form_validation_lang.php b/gocart/language/pt-br/form_validation_lang.php
new file mode 100644
index 00000000..e69de29b
diff --git a/gocart/language/pt-br/giftcard_lang.php b/gocart/language/pt-br/giftcard_lang.php
new file mode 100644
index 00000000..8888ab08
--- /dev/null
+++ b/gocart/language/pt-br/giftcard_lang.php
@@ -0,0 +1,44 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin Giftcard Language
+******************************************/
+
+$lang['giftcards'] = 'Vale-presentes';
+$lang['giftcard_settings'] = 'Configurações Vale-presentes';
+$lang['recipient_email'] = 'E-mail beneficiário';
+$lang['recipient_name'] = 'Nome beneficiário';
+$lang['sender_name'] = 'Nome do doador';
+$lang['personal_message'] = 'Mensagem personalizada';
+$lang['amount'] = 'Valores';
+$lang['send_notification'] = 'Mandar e-mail de notificação';
+$lang['predefined_card_amounts'] = 'Valor pre-definido';
+$lang['predefined_examples'] = '(ex. 10,20,30)';
+$lang['allow_custom_amounts'] = 'Permitir Valores personalizados';
+$lang['add_giftcard'] = 'Adicionar Vale-presente';
+$lang['attributes'] = 'Atributos';
+$lang['settings'] = 'Configurações';
+$lang['yes'] = 'Sim';
+$lang['no'] = 'Não';
+$lang['code'] = 'Código';
+$lang['disable_giftcards'] = 'Desabilitar Vale-presente';
+$lang['enable_giftcards'] = 'Habilitar Vale-presente';
+$lang['to'] = 'Para';
+$lang['from'] = 'De';
+$lang['total'] = 'Total';
+$lang['used'] = 'Usado';
+$lang['remaining'] = 'Restando';
+
+$lang['no_giftcards'] = 'Atualmente não há Vale-presentes.';
+$lang['message_saved_settings'] = 'As configurações do Vale-presente foram salvas.';
+$lang['message_saved_giftcard'] = 'O Vale-presente foi salvo.';
+$lang['message_activated_giftcard'] = 'O Vale-presente foi ativado.';
+$lang['message_deleted_giftcard'] = 'O Vale-presente foi excluÃdo.';
+$lang['confirm_delete_giftcard'] = 'Tem certeza de que deseja excluir este Vale-presente?';
\ No newline at end of file
diff --git a/gocart/language/pt-br/goedit_lang.php b/gocart/language/pt-br/goedit_lang.php
new file mode 100644
index 00000000..6492320a
--- /dev/null
+++ b/gocart/language/pt-br/goedit_lang.php
@@ -0,0 +1,38 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+GoEdit Language
+
+@TODO
+Verificar onde fica essas traduções
+******************************************/
+
+$lang['goedit_toggle_editor'] = 'Editor HTML';
+$lang['goedit_url'] = 'URL';
+$lang['goedit_target'] = 'Target';
+$lang['goedit_self'] = 'Self';
+$lang['goedit_new_window'] = 'Nova janela';
+$lang['goedit_class'] = 'Class';
+$lang['goedit_insert_link'] = 'Insert Link';
+$lang['goedit_root'] = 'Root';
+$lang['goedit_upload'] = 'Upload';
+$lang['goedit_loading'] = 'Loading';
+$lang['goedit_rename'] = 'Rename';
+$lang['goedit_warning'] = 'Warning!';
+$lang['goedit_warning_text'] = 'Deleting a folder will result in the deletion of all it\'s contents. Are you sure you want to perform this action?';
+$lang['goedit_delete_button'] = 'Yes, Delete it!';
+$lang['goedit_image_details'] = 'Image Details';
+$lang['goedit_alt'] = 'Alt';
+$lang['goedit_width'] = 'Width';
+$lang['goedit_height'] = 'Height';
+$lang['goedit_title'] = 'Title';
+$lang['goedit_insert_image'] = 'Insert Image';
+$lang['goedit_update_image'] = 'Update Image';
+$lang['goedit_folder_name'] = 'Folder Name';
\ No newline at end of file
diff --git a/gocart/third_party/index.html b/gocart/language/pt-br/index.html
similarity index 100%
rename from gocart/third_party/index.html
rename to gocart/language/pt-br/index.html
diff --git a/gocart/language/pt-br/location_lang.php b/gocart/language/pt-br/location_lang.php
new file mode 100644
index 00000000..fe37f94b
--- /dev/null
+++ b/gocart/language/pt-br/location_lang.php
@@ -0,0 +1,55 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin Location Language
+******************************************/
+
+$lang['country'] = 'PaÃs';
+$lang['countries'] = 'Paises';
+$lang['zone_areas'] = 'Região';
+$lang['country_zones'] = '%s Estado';
+$lang['zone_areas_for'] = 'Região para %s';
+$lang['zone_area_form'] = 'Região de %s';
+$lang['country_form'] = 'PaÃs para';
+$lang['zone_form'] = 'Formulário de Estado';
+$lang['zones'] = 'Estados';
+$lang['name'] = 'Nome';
+$lang['code'] = 'Código';
+$lang['iso_code_2'] = 'Código ISO 2';
+$lang['iso_code_3'] = 'Código ISO 3';
+$lang['address_format'] = 'Formato de endereço';
+$lang['require_postcode'] = 'CEP obrigatório';
+$lang['tax'] = 'Imposto';
+$lang['status'] = 'Situação';
+$lang['sort_countries'] = 'PaÃses são ordenáveis! Basta arrastar e soltá-los na ordem que você gostaria que eles apareçam.';
+$lang['add_new_country'] = 'Adicionar novo paÃs';
+$lang['add_new_zone'] = 'Adicionar novo estado';
+$lang['add_new_zone_area'] = 'Adicionar nova região';
+$lang['details'] = 'Detalhes';
+$lang['enabled'] = 'Habilitado';
+$lang['sort'] = 'Ordem';
+
+$lang['error_country_not_found'] = 'O paÃs solicitado não pôde ser encontrado.';
+$lang['message_saved_country'] = 'O paÃs foi salvo.';
+$lang['message_deleted_country'] = 'O paÃs foi excluÃdo.';
+$lang['confirm_delete_country'] = 'Tem certeza de que deseja excluir este paÃs?';
+$lang['no_countries'] = 'Atualmente não existem paÃses cadastrados.';
+
+$lang['error_zone_not_found'] = 'O Estado solicitado não pôde ser encontrado.';
+$lang['message_saved_zone'] = 'O Estado foi salvo.';
+$lang['message_deleted_zone'] = 'O Estado foi excluÃdo.';
+$lang['confirm_delete_zone'] = 'Tem certeza de que deseja excluir este Estado?';
+$lang['no_zones'] = 'Atualmente não existem Estados cadastrados.';
+
+$lang['error_zone_area_not_found'] = 'A região solicitada não pôde ser encontrada.';
+$lang['message_saved_zone_area'] = 'A região foi salva.';
+$lang['message_deleted_zone_area'] = 'A região foi excluÃda.';
+$lang['confirm_delete_zone_area'] = 'Tem certeza de que deseja excluir esta região?';
+$lang['no_zone_areas'] = 'Atualmente não existem regiões cadastradas.';
\ No newline at end of file
diff --git a/gocart/language/pt-br/login_lang.php b/gocart/language/pt-br/login_lang.php
new file mode 100644
index 00000000..a5291436
--- /dev/null
+++ b/gocart/language/pt-br/login_lang.php
@@ -0,0 +1,20 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin login Language
+******************************************/
+
+$lang['error_authentication_failed'] = 'Erro ao Logar!';
+$lang['message_logged_out'] = 'Você foi desconectado.';
+$lang['gocart_login'] = 'Loja Virtual login';
+$lang['login'] = 'Login';
+$lang['password'] = 'Senha';
+$lang['email'] = 'E-mail';
+$lang['stay_logged_in'] = 'Manter-me conectado';
\ No newline at end of file
diff --git a/gocart/language/pt-br/migration_lang.php b/gocart/language/pt-br/migration_lang.php
new file mode 100644
index 00000000..e69de29b
diff --git a/gocart/language/pt-br/order_lang.php b/gocart/language/pt-br/order_lang.php
new file mode 100644
index 00000000..740e3bf1
--- /dev/null
+++ b/gocart/language/pt-br/order_lang.php
@@ -0,0 +1,77 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin Order Language
+******************************************/
+
+$lang['orders'] = 'Pedidos';
+$lang['view_order'] = 'Visualizar pedido';
+$lang['notes'] = 'Notas';
+$lang['status'] = 'Situação';
+$lang['giftcard_is_active'] = 'Vale-presente ativo';
+$lang['activate'] = 'Ativo';
+$lang['order'] = 'Pedido';
+$lang['bill_to'] = 'Cobrança para';
+$lang['ship_to'] = 'Envio para';
+$lang['ordered_on'] = 'Solicitado em';
+$lang['from' ] = 'De';
+$lang['to'] = 'Para';
+$lang['term'] = 'Procurar termo';
+$lang['xml_export'] = 'Exportar para XML';
+
+$lang['no_orders'] = 'Atualmente não existem pedidos.';
+$lang['message_order_updated'] = 'O pedido foi atualizado.';
+$lang['message_orders_deleted'] = 'Os pedidos selecionados foram apagados';
+$lang['error_no_orders_selected'] = 'Você não selecionou nenhum pedido para apagar';
+$lang['confirm_delete_order'] = 'Tem certeza de que deseja excluir os pedidos selecionados?';
+$lang['sent_notification_message'] = 'Notificação de e-mail foi enviado!';
+
+$lang['send_email_notification'] = 'Enviar e-mail de notificação';
+$lang['packing_slip'] = 'Embalagem para presente';
+$lang['account_info'] = 'informações da Conta';
+$lang['billing_address'] = 'Endereço de cobrança';
+$lang['shipping_address'] = 'Endereço para envio';
+$lang['order_details'] = 'Detalhes da encomenda';
+$lang['payment_method'] = 'Forma de Pagamento';
+$lang['shipping_details'] = 'Detalhes de envio';
+$lang['shipping_notes'] = 'Informação adicional de Frete';
+$lang['referral'] = 'encaminhamento';
+$lang['is_gift'] = 'Este é um presente.';
+$lang['gift_note'] = 'Nota presente';
+$lang['admin_notes'] = 'Notas de Admin';
+$lang['update_order'] = 'Atualize Ordem';
+$lang['name'] = 'nome';
+$lang['description'] = 'descrição';
+$lang['price'] = 'preço';
+$lang['quantity'] = 'quantidade';
+$lang['qty'] = 'qnt.';
+$lang['total'] = 'total';
+$lang['sku'] = 'SKU';
+
+$lang['coupon_discount'] = 'cupom de desconto';
+$lang['goftcard_discount'] = 'Desconto Vale-presente';
+$lang['subtotal'] = 'subtotal';
+$lang['shipping'] = 'frete';
+$lang['tax'] = 'imposto';
+$lang['total'] = 'total';
+$lang['search_returned'] = 'Sua busca retornou %d resultado(s)';
+$lang['message_templates'] = "modelos de mensagens";
+$lang['select_canned_message'] = '- Selecione uma Mensagem -';
+$lang['message'] = 'mensagem';
+$lang['send_message'] = 'enviar Mensagem';
+$lang['subject'] = 'assunto';
+$lang['account_main_email'] = 'E-mail da conta principal';
+$lang['shipping_email'] = 'E-mail do destinatário';
+$lang['billing_email'] = 'E-mail de cobrança';
+$lang['recipient'] = 'beneficiário';
+$lang['packing_is_gift'] = 'é presente';
+$lang['ship_to_address'] = 'Endereço de entrega';
+$lang['bill_to_address'] = 'Endereço de cobrança';
+$lang['saving'] = 'Saving';
\ No newline at end of file
diff --git a/gocart/language/pt-br/page_lang.php b/gocart/language/pt-br/page_lang.php
new file mode 100644
index 00000000..aebfa822
--- /dev/null
+++ b/gocart/language/pt-br/page_lang.php
@@ -0,0 +1,45 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin Page Language
+******************************************/
+
+$lang['link_information'] = 'Link Information';
+$lang['add_new_page'] = 'Adicionar uma nova página';
+$lang['add_new_link'] = 'Adicionar um novo link';
+$lang['pages'] = 'Páginas';
+$lang['attributes'] = 'Atributos';
+$lang['seo'] = 'SEO';
+$lang['page_form'] = 'Formulário de Página';
+$lang['link_form'] = 'Formulário de Link';
+$lang['title'] = 'TÃtulo';
+$lang['url'] = 'URL';
+$lang['url_example'] = '(ex. http://www.everlon.com.br)';
+$lang['menu_title'] = 'TÃtulo do menu';
+$lang['slug'] = 'Slug';
+$lang['seo_title'] = 'TÃtulo SEO';
+$lang['meta'] = 'Meta Data';
+$lang['sequence'] = 'Sequência';
+$lang['parent_id'] = 'Parentesco';
+$lang['new_window'] = 'Nova janela';
+$lang['open_in_new_window'] = 'Abra esse link em uma nova janela';
+$lang['content'] = 'Conteúdo';
+$lang['top_level'] = 'Principal';
+$lang['follow_link'] = 'Follow Link';
+$lang['go_to_page'] = 'Ir para página';
+
+$lang['no_pages_or_links'] = 'Atualmente não existem páginas ou links.';
+$lang['error_page_not_found'] = 'A página solicitada não pôde ser encontrado.';
+$lang['error_link_not_found'] = 'O link solicitado não pôde ser encontrado.';
+$lang['message_saved_page'] = 'A página foi salva.';
+$lang['message_saved_link'] = 'O link foi salvo.';
+$lang['message_deleted_page'] = 'A página foi excluÃda.';
+$lang['message_deleted_link'] = 'O link foi apagado.';
+$lang['confirm_delete'] = 'Tem certeza de que quer apagar esta página / link?';
diff --git a/gocart/language/pt-br/product_lang.php b/gocart/language/pt-br/product_lang.php
new file mode 100644
index 00000000..958179b7
--- /dev/null
+++ b/gocart/language/pt-br/product_lang.php
@@ -0,0 +1,106 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin Product Language
+******************************************/
+
+$lang['products'] = 'Produtos';
+$lang['search_term'] = 'Buscar termo';
+$lang['product_form'] = 'Formulário de produtos';
+$lang['sku'] = 'SKU';
+$lang['value'] = 'Valor';
+$lang['limit'] = 'Limite';
+$lang['seo_title'] = 'TÃtulo Tag';
+$lang['meta'] = 'Meta Tags';
+$lang['name'] = 'Nome';
+$lang['slug'] = 'URL Keyword';
+$lang['description'] = 'Descrição';
+$lang['details'] = 'Detalhes';
+$lang['enabled'] = 'Habilitado';
+$lang['disabled'] = 'Desabilitado';
+$lang['excerpt'] = 'Resumo';
+$lang['price'] = 'Preço';
+$lang['saleprice'] = 'Preço de venda';
+$lang['weight'] = 'Peso';
+$lang['attributes'] = 'Atributos';
+$lang['categories'] = 'Categorias';
+$lang['add_category'] = 'Adicionar categoria';
+$lang['header_information'] = 'Informação SEO';
+$lang['options'] = 'Opções';
+$lang['related_products'] = 'Produtos relacionados';
+$lang['images'] = 'Imagens';
+$lang['meta_example'] = 'ex. <meta name="description" content="Nós vendemos produtos que ajudam você" />';
+$lang['bulk_save'] = 'Salvar selecionados';
+$lang['add_new_product'] = 'Adicionar novo produto';
+$lang['no_products'] = 'Atualmente não existem produtos cadastrados.';
+$lang['track_stock'] = 'Baixar Estoque';
+$lang['do_not_track_stock'] = 'Não baixar Estoque';
+$lang['out_of_stock'] = 'Fora de estoque';
+$lang['shippable'] = 'Entregável';
+$lang['not_shippable'] = 'Não entregável';
+$lang['taxable'] = 'Com imposto';
+$lang['not_taxable'] = 'Sem importo';
+$lang['fixed_quantity'] = 'Quantidade fixa';
+$lang['quantity'] = 'Quantidade disponÃvel';
+$lang['copy'] = 'Copiar';
+$lang['upload'] = 'Upload';
+$lang['digital_content'] = 'Conteúdo digital';
+$lang['digital_products_desc'] = 'Quantidade disponÃvel.';
+$lang['fixed_quantity_note'] = '(Isso restringe alguém de adicionar várias cópias do item ao seu carrinho.)';
+$lang['quantity_in_stock_note'] = '(Este número só será usado se o produto é marcado "Baixar Estoque")';
+$lang['filter_by_category'] = 'Filtrar por categoria';
+$lang['select_a_category'] = 'Buscar uma categoria';
+$lang['inventory'] = 'Estoque';
+
+//option form elements
+$lang['checklist'] = 'Checklist';
+$lang['radiolist'] = 'Radiolist';
+$lang['droplist'] = 'Droplist';
+$lang['textfield'] = 'Frase';
+$lang['textarea'] = 'Bloco de texto';
+$lang['add_option'] = 'Adicionar opção';
+$lang['select_option_type'] = 'Selecione uma opção';
+
+//option form portion
+$lang['option_name'] = 'Nome da opção';
+$lang['required'] = 'Obrigatória';
+$lang['add_item'] = 'Adicionar novo item';
+
+//related products
+$lang['select_a_product'] = 'Busca por produtos relacionado.';
+$lang['add_related_product'] = 'Adicionar produto relacionado';
+$lang['product_name'] = 'Nome do produto';
+
+//product images
+$lang['primary'] = 'Imagem principal';
+$lang['remove'] = 'Remover';
+$lang['alt_tag'] = 'Texto alternativo';
+$lang['caption'] = 'Descrição';
+
+//confirmations
+$lang['confirm_remove_image'] = 'Tem certeza que deseja remover esta imagem?';
+$lang['confirm_remove_value'] = 'Tem certeza que deseja remover este valor?';
+$lang['confirm_remove_option'] = 'Tem certeza que deseja remover esta opção?';
+$lang['confirm_remove_related'] = 'Tem certeza que deseja remover este item relacionado?';
+$lang['confirm_remove_category'] = 'Tem certeza que deseja remover esta categoria?';
+$lang['confirm_delete_product'] = 'Tem certeza que deseja excluir este produto?';
+
+//alerts
+$lang['alert_must_name_option'] = 'Você deve dar um nome esta opção.';
+$lang['alert_product_related'] = 'Este produto está já relacionado.';
+$lang['alert_select_product'] = 'Selecione um produto para adicionar primeiro.';
+
+//messages & errors
+$lang['message_saved_product'] = 'O produto foi salva.';
+$lang['message_bulk_update'] = 'Seus produtos foram atualizados.';
+$lang['message_deleted_product'] = 'O produto foi excluÃdo.';
+$lang['error_not_found'] = 'O produto solicitado não pôde ser encontrado.';
+$lang['error_bulk_no_products'] = 'Não há produtos selecionados para atualização';
+$lang['search_returned'] = 'Sua busca retornou %d resultado(s)';
\ No newline at end of file
diff --git a/gocart/language/pt-br/report_lang.php b/gocart/language/pt-br/report_lang.php
new file mode 100644
index 00000000..1186e5a8
--- /dev/null
+++ b/gocart/language/pt-br/report_lang.php
@@ -0,0 +1,44 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin report Language
+******************************************/
+
+$lang['reports'] = 'Relatórios';
+$lang['best_sellers'] = 'Mais vendidos';
+$lang['sales'] = 'Vendas';
+$lang['from'] = 'De';
+$lang['to'] = 'Para';
+$lang['sku'] = 'SKU';
+$lang['name'] = 'Nome';
+$lang['quantity'] = 'Quantidade';
+$lang['date'] = 'Mês/Ano';
+$lang['january'] = 'Janeiro';
+$lang['february'] = 'Fevereiro';
+$lang['march'] = 'Março';
+$lang['april'] = 'Abril';
+$lang['may'] = 'Maio';
+$lang['june'] = 'Junho';
+$lang['july'] = 'Julho';
+$lang['august'] = 'Agosto';
+$lang['september'] = 'Setembro';
+$lang['october'] = 'Outubro';
+$lang['november'] = 'Novembro';
+$lang['december'] = 'Dezembro';
+
+$lang['get_best_sellers'] = 'Obter Melhores vendedores';
+$lang['get_monthly_sales'] = 'Obter Vendas Mensais';
+$lang['coupon_discounts'] = 'Cupom de Descontos';
+$lang['gift_card_discounts'] = 'Descontos de Vale-presentes';
+$lang['products'] = 'produtos';
+$lang['shipping'] = 'Frete';
+$lang['tax'] = 'Imposto';
+$lang['grand_total'] = 'Total';
+$lang['loading'] = 'Loading';
\ No newline at end of file
diff --git a/gocart/language/pt-br/settings_lang.php b/gocart/language/pt-br/settings_lang.php
new file mode 100644
index 00000000..c09aa24b
--- /dev/null
+++ b/gocart/language/pt-br/settings_lang.php
@@ -0,0 +1,37 @@
+
+* @link http://www.everlon.com.br
+* @version 1.0 (em desenvolvimento)
+* @copyright 2013
+*/
+
+/******************************************
+Português brasileiro
+Admin Settings Language
+******************************************/
+
+$lang['settings'] = 'Configurações';
+$lang['message_name'] = 'Nome da mensagem';
+$lang['subject'] = 'Assunto';
+$lang['message_content'] = 'Conteúdo da mensagem';
+$lang['canned_messages'] = 'Mensagens Fixas';
+$lang['canned_message_form'] = 'Formulário de Mensagens Fixas';
+$lang['settings_updated'] = '"%s" configurações foram atualizadas.';
+$lang['payment_settings'] = '"%s" configurações de pagamento.';
+$lang['shipping_settings'] = '"%s" configurações de frete.';
+$lang['payment_settings_title'] = 'Configurações de Pagamento';
+$lang['shipping_settings_title'] = 'Configurações de Frete';
+$lang['add_canned_message'] = 'Adicionar mensagem';
+$lang['payment_modules'] = "Modulos de Pagamentos";
+$lang['shipping_modules'] = "Modulos de Frete";
+$lang['uninstall'] = 'Desinstalar';
+$lang['install'] = 'Instalar';
+$lang['confirm_are_you_sure'] = 'Tem certeza de que quer fazer isto?';
+$lang['message_saved_message'] = 'A mensagem foi salva.';
+$lang['message_deleted_message'] = 'A mensagem foi apagada.';
+
+$lang['save_canned_message'] = 'Salvar mensagem';
+$lang['tab_canned_info'] = 'Informações da mensagem';
+$lang['label_canned_name'] = 'Nome';
+$lang['label_canned_subject'] = 'Assunto';
\ No newline at end of file
diff --git a/gocart/libraries/Auth.php b/gocart/libraries/Auth.php
index 255d2368..60933544 100644
--- a/gocart/libraries/Auth.php
+++ b/gocart/libraries/Auth.php
@@ -12,7 +12,13 @@ function __construct()
$this->CI =& get_instance();
$this->CI->load->database();
$this->CI->load->library('encrypt');
- $this->CI->load->library('session');
+
+ $admin_session_config = array(
+ 'sess_cookie_name' => 'admin_session_config',
+ 'sess_expiration' => 0
+ );
+ $this->CI->load->library('session', $admin_session_config, 'admin_session');
+
$this->CI->load->helper('url');
}
@@ -24,7 +30,7 @@ function check_access($access, $default_redirect=false, $redirect = false)
the system will act accordingly.
*/
- $admin = $this->CI->session->userdata('admin');
+ $admin = $this->CI->admin_session->userdata('admin');
$this->CI->db->select('access');
$this->CI->db->where('id', $admin['id']);
@@ -73,18 +79,18 @@ function check_access($access, $default_redirect=false, $redirect = false)
function is_logged_in($redirect = false, $default_redirect = true)
{
- //var_dump($this->CI->session->userdata('session_id'));
+ //var_dump($this->CI->admin_session->userdata('session_id'));
//$redirect allows us to choose where a customer will get redirected to after they login
//$default_redirect points is to the login page, if you do not want this, you can set it to false and then redirect wherever you wish.
- $admin = $this->CI->session->userdata('admin');
+ $admin = $this->CI->admin_session->userdata('admin');
if (!$admin)
{
if ($redirect)
{
- $this->CI->session->set_flashdata('redirect', $redirect);
+ $this->CI->admin_session->set_flashdata('redirect', $redirect);
}
if ($default_redirect)
@@ -104,7 +110,7 @@ function is_logged_in($redirect = false, $default_redirect = true)
$this->logout();
if($redirect)
{
- $this->CI->session->set_flashdata('redirect', $redirect);
+ $this->CI->admin_session->set_flashdata('redirect', $redirect);
}
if($default_redirect)
@@ -121,7 +127,7 @@ function is_logged_in($redirect = false, $default_redirect = true)
if($admin['expire'])
{
$admin['expire'] = time()+$this->session_expire;
- $this->CI->session->set_userdata(array('admin'=>$admin));
+ $this->CI->admin_session->set_userdata(array('admin'=>$admin));
}
}
@@ -160,7 +166,7 @@ function login_admin($email, $password, $remember=false)
$admin['admin']['expire'] = false;
}
- $this->CI->session->set_userdata($admin);
+ $this->CI->admin_session->set_userdata($admin);
return true;
}
else
@@ -174,8 +180,8 @@ function login_admin($email, $password, $remember=false)
*/
function logout()
{
- $this->CI->session->unset_userdata('admin');
- $this->CI->session->sess_destroy();
+ $this->CI->admin_session->unset_userdata('admin');
+ $this->CI->admin_session->sess_destroy();
}
/*
diff --git a/gocart/libraries/Go_cart.php b/gocart/libraries/Go_cart.php
old mode 100755
new mode 100644
index b7e5212d..983f2806
--- a/gocart/libraries/Go_cart.php
+++ b/gocart/libraries/Go_cart.php
@@ -1,11 +1,13 @@
CI =& get_instance();
- $this->CI->load->model('Coupon_model');
- $this->CI->load->model('Gift_card_model');
+ $this->CI->load->model(array('Coupon_model' , 'Gift_card_model', 'Settings_model', 'Digital_Product_model'));
// Load the saved session
if ($this->CI->session->userdata('cart_contents') !== FALSE)
@@ -74,6 +76,7 @@ private function _init_properties($totals_only=false, $preserve_customer=false)
$this->_cart_contents['taxable_coupon_discount'] = 0;
$this->_cart_contents['gift_card_balance'] = 0;
$this->_cart_contents['gift_card_discount'] = 0;
+ $this->_cart_contents['downloads'] = array();
// totals
$this->_cart_contents['cart_subtotal'] = 0;
$this->_cart_contents['cp_discounted_subtotal'] = 0;
@@ -83,11 +86,10 @@ private function _init_properties($totals_only=false, $preserve_customer=false)
$this->_cart_contents['shipping_total'] = 0;
// tax
$this->_cart_contents['tax'] = 0;
-
-
// We want to preserve the cart items and properties, but reset total values when recalculating
- if( ! $totals_only) {
+ if( ! $totals_only)
+ {
// product items will live in here
$this->_cart_contents['items'] = array();
@@ -102,8 +104,9 @@ private function _init_properties($totals_only=false, $preserve_customer=false)
$this->_cart_contents['custom_charges'] = array();
// shipping details container
- $this->_cart_contents['shipping']['method'] = "No Shipping"; // defaults
- $this->_cart_contents['shipping']['price'] = 0.00;
+ $this->_cart_contents['shipping']['method'] = false; // defaults
+ $this->_cart_contents['shipping']['price'] = false;
+ $this->_cart_contents['shipping']['code'] = false;
// This is the list of gift cards that are attached to the cart
// to be applied toward a price reduction
@@ -146,6 +149,10 @@ private function _init_properties($totals_only=false, $preserve_customer=false)
private function _insert($item)
{
+ //on update clear the payments & shipping
+ $this->clear_payment();
+ $this->clear_shipping();
+
// Was any cart data passed? No? Bah...
if ( ! is_array($item) OR count($item) == 0)
{
@@ -163,7 +170,7 @@ private function _insert($item)
//record the quantity
- $quantity = $item['quantity'];
+ $quantity = ($item['fixed_quantity']==0) ? $item['quantity'] : 1;
//remove quantity from the row ID hash this will enable us to add
//the same item twice without having it appear twice due to quantity differences
@@ -205,7 +212,11 @@ private function _insert($item)
//this is for non-edited products (except for quantity)
if(isset($this->_cart_contents['items'][$newkey]))
{
- $this->_cart_contents['items'][$newkey]['quantity'] = $this->_cart_contents['items'][$newkey]['quantity'] + $item['quantity'];
+ //make sure that fixed quantity items remain fixed quantity
+ if(!(bool)$item['fixed_quantity'])
+ {
+ $this->_cart_contents['items'][$newkey]['quantity'] = $this->_cart_contents['items'][$newkey]['quantity'] + $item['quantity'];
+ }
}
else
{
@@ -246,13 +257,22 @@ private function _remove($cartkey)
private function _update($cartkey, $quantity)
{
+ //on update clear the payments & shipping
+ $this->clear_payment();
+ $this->clear_shipping();
+
if(!isset($this->_cart_contents['items'][$cartkey]))
{
return false;
}
- // update cart quantity
- $this->_cart_contents['items'][$cartkey]['quantity'] = ceil($quantity);
+ // update cart, fixed quantity items restricted to 1
+ if($this->_cart_contents['items'][$cartkey]['fixed_quantity']==0)
+ {
+ $this->_cart_contents['items'][$cartkey]['quantity'] = ceil($quantity);
+ } else {
+ $this->_cart_contents['items'][$cartkey]['quantity'] = 1;
+ }
// Update associated coupon discount data
if(isset($this->_cart_contents['items'][$cartkey]['coupon_code']))
@@ -350,7 +370,8 @@ private function _apply_coupon_to_product($cartkey, $coupon_code)
// To start, it needs to look like:
// applied_coupons[ coupon code index ][ product key index] = array list of discounts,repeated to product quantity
- for($x=0;$x<$this->_cart_contents['items'][$cartkey]['quantity'];$x++) {
+ for($x=0;$x<$this->_cart_contents['items'][$cartkey]['quantity'];$x++)
+ {
$this->_cart_contents['applied_coupons'][$coupon_code][$cartkey][] = $discount_amount;
}
@@ -386,8 +407,7 @@ private function _insert_coupon($coupon_code)
// apply coupon discount for free shipping, whole order discount, or product level
if ($coupon['reduction_target'] =="shipping") {
- //$this->_cart_contents['requires_shipping'] = false;
- // Remember what code was used for free shipping
+ // Remember what code was used for free shipping
$this->_cart_contents['free_shipping_coupon'] = $coupon_code;
$is_applied = true;
@@ -432,54 +452,55 @@ private function _insert_coupon($coupon_code)
if(!$is_applied) {
// message coupon added but not applied
- return array('message'=>'Your coupon does not apply to any products in your cart');
+ return array('message'=>lang('coupon_not_apply'));
} else {
// message coupon applied
- return array('message'=>'Your coupon has been applied to your products.');
+ return array('message'=>lang('coupon_applied'));
}
} else {
// message coupon no longer valid
- return array('error'=>'Sorry, but the coupon you entered is not valid at this time.');
+ return array('error'=>lang('coupon_invalid'));
}
} else {
// message coupon already applied
- return array('error'=>'That coupon code has already been applied to your items.');
+ return array('error'=>lang('coupon_already_applied'));
}
} else {
// invalid code error message
- return array('error'=>'There was no coupon with that code. Check to make sure you entered it correctly.');
+ return array('error'=>lang('invalid_coupon_code'));
}
}
// Calculate the best possible discount within the product instance limitations for the whole cart
// return the discount amount
- private function _calculate_coupon_discount() {
-
+ private function _calculate_coupon_discount()
+ {
$total_discount = 0;
//keep tabs on how much is taxable
$taxable_discount = 0;
// Get the sum of the product-level coupons
- if( ! empty($this->_cart_contents['applied_coupons'])) {
+ if( ! empty($this->_cart_contents['applied_coupons']))
+ {
foreach($this->_cart_contents['applied_coupons'] as $code=>$discount_list)
{
-
// The discount list is an array of arrays, indexed by cart key
// we need to prep this list for a final discount aggregation
// by collapsing this into a singular array of all product discounts
// from which we will calculate the total discount per coupon
- $collapsed = array();
- $product_index = array();
+ $collapsed = array();
+ $product_index = array();
$x = 0; // we will use this to cross-index what discounts belong to what product
// so that we can separate taxable from non-taxable amounts
foreach($discount_list as $key=>$item)
{
- foreach($item as $discount) {
- $collapsed[$x] = $discount;
- $product_index[$x] = $key;
+ foreach($item as $discount)
+ {
+ $collapsed[$x] = $discount;
+ $product_index[$x] = $key;
$x++;
}
// because each product can only have one coupon associated
@@ -494,7 +515,9 @@ private function _calculate_coupon_discount() {
if($this->_cart_contents['coupon_list'][$code]['max_product_instances'] == 0 || count($collapsed)<=$this->_cart_contents['coupon_list'][$code]['max_product_instances'])
{
$maximum = count($collapsed);
- } else {
+ }
+ else
+ {
$maximum = $this->_cart_contents['coupon_list'][$code]['max_product_instances'];
}
@@ -505,12 +528,11 @@ private function _calculate_coupon_discount() {
// store the total discount in the item details, for future reference
$this->_cart_contents['items'][$product_index[$x]]['total_coupon_discount'] += $collapsed[$x];
// taxable?
- if( $this->_cart_contents['items'][$product_index[$x]]['shippable'] == 1 )
+ if( $this->_cart_contents['items'][$product_index[$x]]['taxable'] == 1 )
{
$taxable_discount += $collapsed[$x];
}
}
-
}
}
@@ -527,19 +549,35 @@ private function _calculate_coupon_discount() {
if(is_numeric($disc))
{
$discount_amount = $disc;
- } else {
+ }
+ else
+ {
eval('$discount_amount=$subtotal'.$disc.';');
}
- if($discount_amount > $temp) {
+ if($discount_amount > $temp)
+ {
$temp = $discount_amount;
$this->_cart_contents['whole_order_discount_cp'] = $code; // track which code we use
}
}
- $total_discount = $temp;
+ // coupon discounts and whole order discounts can be cumulated
+ $total_discount += $temp;
+ $total_whole_order_discount = $temp;
+
+ // iterate products and apply calculated whole order discount % to taxable ones
+ if ($this->_cart_contents['cart_subtotal'] > 0){
+ $whole_order_discount_ratio = $total_whole_order_discount / (float)$this->_cart_contents['cart_subtotal'];
+ foreach ($this->_cart_contents['items'] as $product)
+ {
+ if ($product['taxable'] == 1)
+ {
+ $taxable_discount += $whole_order_discount_ratio * (float)$product['price'] * (int)$product['quantity'];
+ }
+ }
+ }
}
-
$this->_cart_contents['cp_discounted_subtotal'] = $this->_cart_contents['cart_subtotal'] - $total_discount;
$this->_cart_contents['coupon_discount'] = $total_discount;
// this is the portion of the discount that applies to a taxable amount
@@ -552,6 +590,10 @@ private function _calculate_coupon_discount() {
// Attach a Gift Card discount to the order
private function _attach_gift_card($gc_code)
{
+ //on when attaching a gitcard reset payments and shipping
+ $this->clear_payment();
+ $this->clear_shipping();
+
// enabled?
if( ! $this->gift_cards_enabled) return;
@@ -574,18 +616,18 @@ private function _attach_gift_card($gc_code)
$this->_cart_contents['gift_card_balance'] += $this->_cart_contents['gc_list'][$gc_code]['balance'];
// message coupon applied
- return array('message'=>'You should see your card balance displayed.');
+ return array('message'=>lang('giftcard_balance_displayed'));
} else {
// invalid card (expired or zero balance)
- return array('error'=>'Sorry, but the gift card you entered is expired or has a zero balance.');
+ return array('error'=>lang('giftcard_zero_balance'));
}
} else {
// invalid card code
- return array('error'=>'The gift card code you entered does not exist.');
+ return array('error'=>lang('giftcard_not_exist'));
}
} else {
// already applied
- return array('message'=>'Your gift card is already applied');
+ return array('message'=>lang('giftcard_already_applied'));
}
}
}
@@ -676,31 +718,34 @@ private function _save_cart($recalculate=true)
eval('$this_price=$val["price"]'. $this->_cart_contents['customer']['group_discount_formula'] .';');
// add to the total group discount
- $this->_cart_contents['group_discount'] += ($val['price'] - $this_price) * $val['quantity'];
+ $this->_cart_contents['group_discount'] += ($val['price'] - $this_price) * $val['quantity'];
} else {
// or use the regular price
$this_price = $val['price'];
}
- // Deal with non shippable vs shippable items
- if ( $val['shippable']==0 )
+ // Deal with shippable (if shipping is disabled in the config then go with that!)
+ if ( $val['shippable']== 1 )
{
- // digital product (non-taxable)
- $total += $this_price;
- } else {
- // shippable items (taxable)
- $total += ($this_price * $val['quantity']);
- $taxable += ($this_price * $val['quantity']);
// shipping insurable value & weight
$this->_cart_contents['order_insurable_value'] += $this_price;
$this->_cart_contents['order_weight'] += $val['weight']*$val['quantity'];
$this->_cart_contents['requires_shipping'] = true;
}
+ // charge tax?
+ if($val['taxable'] == 1)
+ {
+ $taxable += ($this_price * $val['quantity']);
+ }
+
+ $total += ($this_price * $val['quantity']);
+
// set product subtotal (NOT accounting for coupon discount yet)
$val['subtotal'] = ($this_price * $val['quantity']);
}
+
// total products in the cart
$this->_cart_contents['total_items'] = count($this->_cart_contents['items']);
@@ -735,11 +780,14 @@ private function _save_cart($recalculate=true)
// Shipping costs
if($this->_cart_contents['requires_shipping'])
{
- $this->_cart_contents['cart_total'] += $this->_cart_contents['shipping']['price'];
- } else {
+ $this->_cart_contents['cart_total'] += $this->_cart_contents['shipping']['price'];
+ $this->_cart_contents['taxable_total'] += $this->_cart_contents['shipping']['price'];
+ }
+ else
+ {
// placeholders
- $this->_cart_contents['shipping']['method'] = "No Shipping";
- $this->_cart_contents['shipping']['price'] = 0.00;
+ $this->_cart_contents['shipping']['method'] = false; // defaults
+ $this->_cart_contents['shipping']['price'] = false;
}
// Compute taxes AFTER shipping costs are added in ?
@@ -779,6 +827,62 @@ private function _compute_tax()
*
********************************************************/
+ /**
+ * Double check that each item has enough in stock from the database
+ *
+ * @access public
+ * @return bool
+ */
+ function check_inventory()
+ {
+ $contents = $this->contents();
+
+ //this array merges any products that share the same product id
+ $new_contents = array();
+ foreach($contents as $c)
+ {
+ // skip gift card products
+ if($c['is_gc'])
+ {
+ continue;
+ }
+
+ //combine any product id's and tabulate their quantities
+ if(array_key_exists($c['id'], $new_contents))
+ {
+ $new_contents[$c['id']] = intval($new_contents[$c['id']])+intval($c['quantity']);
+ }
+ else
+ {
+ $new_contents[$c['id']] = $c['quantity'];
+ }
+ }
+
+ $error = '';
+ $this->CI->load->model('Product_model');
+ foreach($new_contents as $product_id => $quantity)
+ {
+ $product = $this->CI->Product_model->get_product($product_id);
+
+ //make sure we're tracking stock for this product
+ if((bool)$product->track_stock)
+ {
+ if(intval($quantity) > intval($product->quantity))
+ {
+ $error .= ''.sprintf(lang('not_enough_stock'), $product->name, $product->quantity).'
';
+ }
+ }
+ }
+
+ if(!empty($error))
+ {
+ return $error;
+ }
+ else
+ {
+ return false;
+ }
+ }
/**
@@ -795,7 +899,9 @@ function insert($items = array())
{
return FALSE;
}
-
+
+ //reset payment options so they get reset if someone adds a product at a later time
+
// You can either insert a single product using a one-dimensional array,
// or multiple products using a multi-dimensional one. The way we
// determine the array type is by looking for a required array key named "id"
@@ -827,6 +933,11 @@ function insert($items = array())
if ($save_cart == TRUE)
{
$this->_save_cart();
+
+ //clear the shipping after the cart is updated.
+ //This will ensure the rates need to be reset if they would differ
+ $this->clear_shipping();
+
return TRUE;
}
@@ -844,6 +955,10 @@ function update_cart($qty_list=false, $coupon_code=false, $gc_code=false)
$error = '';
$message = '';
+ //on update clear the payments & shipping
+ $this->clear_payment();
+ $this->clear_shipping();
+
// insert any coupons that might be sent
if($coupon_code)
{
@@ -904,39 +1019,50 @@ function update_cart($qty_list=false, $coupon_code=false, $gc_code=false)
{
$this->_save_cart();
}
-
-
+
return $response;
}
- //save additional settings
- function set_additional_details($data)
+ // save / get order download list
+ function save_order_downloads($list)
+ {
+ $this->_cart_contents['downloads'] = $list;
+ }
+
+ function get_order_downloads()
+ {
+ return $this->_cart_contents['downloads'];
+ }
+
+ //save additional setting
+ function set_additional_detail($key, $data)
{
- $this->_cart_contents['additional_details'] = $data;
+ $this->_cart_contents[$key] = $data;
$this->_save_cart(false);
}
- function additional_details()
+ //grab a detail
+ function get_additional_detail($key)
{
- if(isset($this->_cart_contents['additional_details']))
+ if(isset($this->_cart_contents[$key]))
{
- return $this->_cart_contents['additional_details'];
+ return $this->_cart_contents[$key];
}
else
{
- //return the array blank
- return array('referral'=>''
- ,'shipping_notes'=>''
- );
+ return false;
}
-
}
+
// set shipping details
- function set_shipping($method, $price)
+ function set_shipping($method, $price, $code)
{
- if(!is_numeric($price)) return false;
+ if(!is_numeric($price))
+ {
+ return false;
+ }
- $this->_cart_contents['shipping'] = array('method'=>$method, 'price'=> (float) $price);
+ $this->_cart_contents['shipping'] = array('method'=>$method, 'price'=> (float) $price, 'code'=>$code);
//update cart - recalculate
$this->_save_cart();
@@ -945,12 +1071,21 @@ function set_shipping($method, $price)
//remove shipping details
function clear_shipping()
{
- $this->_cart_contents['shipping']['method'] = "No Shipping"; // defaults
- $this->_cart_contents['shipping']['price'] = 0.00;
+ $this->_cart_contents['shipping']['method'] = false;
+ $this->_cart_contents['shipping']['price'] = false;
+ $this->_cart_contents['shipping']['code'] = false;
$this->_save_cart();
}
+ function clear_payment()
+ {
+ $this->_cart_contents['payment'] = false;
+
+ // save cart - no recalculation necessary
+ $this->_save_cart(false);
+ }
+
function set_payment($module, $description)
{
$this->_cart_contents['payment'] = array('module'=>$module, 'description'=>$description);
@@ -970,15 +1105,29 @@ function set_payment_confirmed()
// This saves the confirmed order
function save_order() {
-
-
+
$this->CI->load->model('order_model');
+ $this->CI->load->model('Product_model');
//prepare our data for being inserted into the database
$save = array();
+ // Is this a non shippable order?
+ $none_shippable = true;
+ foreach ($this->_cart_contents['items'] as $item)
+ {
+ if($item['shippable']==1)
+ {
+ $none_shippable = false;
+ }
+ }
//default status comes from the config file
- $save['status'] = $this->CI->config->item('order_status');
+ if($none_shippable)
+ {
+ $save['status'] = $this->CI->config->item('nonship_status');
+ } else {
+ $save['status'] = $this->CI->config->item('order_status');
+ }
//if the id exists, then add it to the array $save array and remove it from the customer
if(isset($this->_cart_contents['customer']['id']) && $this->_cart_contents['customer']['id'] != '')
@@ -1027,8 +1176,6 @@ function save_order() {
//shipping information
$save['shipping_method'] = $this->_cart_contents['shipping']['method'];
$save['shipping'] = $this->_cart_contents['shipping']['price'];
- //I will add a shipping notes feature later
- //$data['shipping_notes'] = $this->_cart_contents['shipping_notes'];
//add in the other charges
$save['tax'] = $this->_cart_contents['tax'];
@@ -1053,9 +1200,8 @@ function save_order() {
}
//save additional details
- $details = $this->additional_details();
- $save['referral'] = $details['referral'];
- $save['shipping_notes'] = $details['shipping_notes'];
+ $save['referral'] = $this->get_additional_detail('referral');
+ $save['shipping_notes'] = $this->get_additional_detail('shipping_notes');
//ordered_on datetime stamp
$save['ordered_on'] = date('Y-m-d H:i:s');
@@ -1075,38 +1221,59 @@ function save_order() {
// dont do anything else if the order failed to save
if(!$order_id) return false;
-
- if($this->gift_cards_enabled) {
-
- $this->CI->load->model('Gift_card_model');
+
+
+ // Process any per-item operations
+ $download_package = array(); //create digital package array
+ foreach ($this->_cart_contents['items'] as $item)
+ {
- // save purchased gift cards
- foreach ($this->_cart_contents['items'] as $item)
+ // Process Gift Card purchase
+ if($this->gift_cards_enabled && isset($item['gc_info']))
{
- if(isset($item['gc_info']))
- {
- $gc_data = array();
- $gc_data['order_number'] = $order_id;
- $gc_data['beginning_amount'] = $item['price'];
- $gc_data['code'] = $item['code'];
- $gc_data= array_merge($gc_data, $item['gc_info']);
-
- $this->CI->Gift_card_model->save_card($gc_data);
-
- //send the recipient a message
- $this->CI->Gift_card_model->send_notification($gc_data);
-
- }
+ $gc_data = array();
+ $gc_data['order_number'] = $order_id;
+ $gc_data['beginning_amount'] = $item['price'];
+ $gc_data['code'] = $item['code'];
+ $gc_data= array_merge($gc_data, $item['gc_info']);
+
+ $this->CI->Gift_card_model->save_card($gc_data);
+
+ //send the recipient a message
+ $this->CI->Gift_card_model->send_notification($gc_data);
}
+
-
- // update the balance of any gift cards used to purchase the order
- if(isset($this->_cart_contents['gc_list']))
+ // Process Downloadable Products
+ if(!empty($item['file_list']))
{
- $this->CI->Gift_card_model->update_used_card_balances($this->_cart_contents['gc_list']);
+ // compile a list of all the items that can be downloaded for this order
+ $download_package[] = $item['file_list'];
}
+ //deduct any quantities from the database
+ if(!$item['is_gc'])
+ {
+ $product = $this->CI->Product_model->get_product($item['id']);
+ $new_quantity = intval($product->quantity) - intval($item['quantity']);
+ $product_quantity = array('id'=>$product->id, 'quantity'=>$new_quantity);
+ $this->CI->Product_model->save($product_quantity);
+ }
}
+ //add the digital packages to the database
+ if(!empty($download_package))
+ {
+ // create the record, send the email
+ $this->CI->Digital_Product_model->add_download_package($download_package, $order_id);
+ }
+
+
+
+ // update the balance of any gift cards used to purchase the order
+ if($this->gift_cards_enabled && isset($this->_cart_contents['gc_list']))
+ {
+ $this->CI->Gift_card_model->update_used_card_balances($this->_cart_contents['gc_list']);
+ }
// touch any used product coupons (increment usage)
if(isset($this->_cart_contents['applied_coupons']))
@@ -1127,6 +1294,8 @@ function save_order() {
$this->CI->Coupon_model->touch_coupon($this->_cart_contents['whole_order_discount_cp']);
}
+
+
return $order_id;
}
@@ -1157,7 +1326,7 @@ function taxable_total()
function total()
{
- return $this->_cart_contents['cart_total'];
+ return round($this->_cart_contents['cart_total'], 2);
}
function subtotal()
@@ -1214,24 +1383,38 @@ function requires_shipping()
}
function is_free_shipping()
{
- if( ! $this->_cart_contents['free_shipping_coupon']) return false;
- else return true; // if the value isn't false, it must be set
+ if( ! $this->_cart_contents['free_shipping_coupon'])
+ {
+ return false;
+ }
+ else
+ {
+ return true; // if the value isn't false, it must be set
+ }
}
- // return array
- function payment_method()
- {
- return $this->_cart_contents['payment'];
- }
-
function shipping_method()
{
return $this->_cart_contents['shipping'];
}
+
function shipping_cost()
{
return $this->_cart_contents['shipping']['price'];
}
+
+ function shipping_code()
+ {
+ return $this->_cart_contents['shipping']['code'];
+ }
+
+ // return array
+ function payment_method()
+ {
+ return $this->_cart_contents['payment'];
+ }
+
+
function get_custom_charges()
{
@@ -1295,10 +1478,10 @@ function total_items()
* @access public
* @return null
*/
- function destroy($keep_login_session=true)
+ function destroy($keep_customer_data=true)
{
// reset the cart values
- $this->_init_properties(false,$keep_login_session);
+ $this->_init_properties(false,$keep_customer_data);
// save the updated cart to our session
$this->_save_cart(false);
}
diff --git a/gocart/libraries/MY_Pagination.php b/gocart/libraries/MY_Pagination.php
index cf385bb5..8e5507ec 100644
--- a/gocart/libraries/MY_Pagination.php
+++ b/gocart/libraries/MY_Pagination.php
@@ -88,24 +88,35 @@ function create_links()
$start = (($this->cur_page - $this->num_links) > 0) ? $this->cur_page - ($this->num_links - 1) : 1;
$end = (($this->cur_page + $this->num_links) < $num_pages) ? $this->cur_page + $this->num_links : $num_pages;
+ $get_sort = '';
// Is pagination being used over GET or POST? If get, add a per_page query
// string. If post, add a trailing slash to the base URL if needed
if ($this->page_query_string === TRUE)
{
$this->base_url = rtrim($this->base_url).'&'.$this->query_string_segment.'=';
+ if(!empty($_GET['by']))
+ {
+ $get_sort = '&by='.$_GET['by'];
+ }
}
else
{
$this->base_url = rtrim($this->base_url, '/') .'/';
+ if(!empty($_GET['by']))
+ {
+ $get_sort = '/?by='.$_GET['by'];
+ }
}
-
+
+
+
// And here we go...
$output = '';
-
+
// Render the "First" link
if ($this->cur_page > ($this->num_links + 1))
{
- $output .= $this->first_tag_open.''.$this->first_link.''.$this->first_tag_close;
+ $output .= $this->first_tag_open.''.$this->first_link.''.$this->first_tag_close;
}
// Render the "previous" link
@@ -113,7 +124,7 @@ function create_links()
{
$i = $uri_page_number - $this->per_page;
if ($i == 0) $i = '';
- $output .= $this->prev_tag_open.''.$this->prev_link.''.$this->prev_tag_close;
+ $output .= $this->prev_tag_open.''.$this->prev_link.''.$this->prev_tag_close;
}
// Write the digit links
@@ -130,7 +141,7 @@ function create_links()
else
{
$n = ($i == 0) ? '' : $i;
- $output .= $this->num_tag_open.''.$loop.''.$this->num_tag_close;
+ $output .= $this->num_tag_open.''.$loop.''.$this->num_tag_close;
}
}
}
@@ -138,14 +149,14 @@ function create_links()
// Render the "next" link
if ($this->cur_page < $num_pages)
{
- $output .= $this->next_tag_open.''.$this->next_link.''.$this->next_tag_close;
+ $output .= $this->next_tag_open.''.$this->next_link.''.$this->next_tag_close;
}
// Render the "Last" link
if (($this->cur_page + $this->num_links) < $num_pages)
{
$i = (($num_pages * $this->per_page) - $this->per_page);
- $output .= $this->last_tag_open.''.$this->last_link.''.$this->last_tag_close;
+ $output .= $this->last_tag_open.''.$this->last_link.''.$this->last_tag_close;
}
// Kill double slashes. Note: Sometimes we can end up with a double slash
diff --git a/gocart/libraries/payment/authorize_net/forms/admin_form.php b/gocart/libraries/payment/authorize_net/forms/admin_form.php
deleted file mode 100644
index d441ff87..00000000
--- a/gocart/libraries/payment/authorize_net/forms/admin_form.php
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
diff --git a/gocart/libraries/payment/paypal_express/forms/admin_form.php b/gocart/libraries/payment/paypal_express/forms/admin_form.php
deleted file mode 100644
index 0b0fbc5a..00000000
--- a/gocart/libraries/payment/paypal_express/forms/admin_form.php
+++ /dev/null
@@ -1,44 +0,0 @@
-
-
diff --git a/gocart/libraries/shipping/fedex/lib_old/fedex.php b/gocart/libraries/shipping/fedex/lib_old/fedex.php
deleted file mode 100644
index e107e68d..00000000
--- a/gocart/libraries/shipping/fedex/lib_old/fedex.php
+++ /dev/null
@@ -1,189 +0,0 @@
-server = $server;
- }
-
- function setAccountNumber($accountNumber) {
- $this->accountNumber = $accountNumber;
- }
-
- function setMeterNumber($meterNumber) {
- $this->meterNumber = $meterNumber;
- }
-
- function setCarrierCode($carrierCode) {
- $this->carrierCode = $carrierCode;
- }
-
- function setDropoffType($dropoffType) {
- $this->dropoffType = $dropoffType;
- }
-
- function setService($service, $name) {
- $this->service = $service;
- $this->serviceName = $name;
- }
-
- function setPackaging($packaging) {
- $this->packaging = $packaging;
- }
-
- function setWeightUnits($units) {
- $this->weightUnits = $units;
- }
-
- function setWeight($weight) {
- $this->weight = $weight;
- }
-
- function setOriginStateOrProvinceCode($code) {
- $this->originStateOrProvinceCode = $code;
- }
-
- function setOriginPostalCode($code) {
- $this->originPostalCode = $code;
- }
-
- function setOriginCountryCode($code) {
- $this->originCountryCode = $code;
- }
-
- function setDestStateOrProvinceCode($code) {
- $this->destStateOrProvinceCode = $code;
- }
-
- function setDestPostalCode($code) {
- $this->destPostalCode = $code;
- }
-
- function setDestCountryCode($code) {
- $this->destCountryCode = $code;
- }
-
- function setPayorType($type) {
- $this->payorType = $type;
- }
-
- function getPrice() {
-
- $str = '';
- $str .= ' ';
- $str .= ' ';
- $str .= ' Express Rate';
- $str .= ' '.$this->accountNumber.'';
- $str .= ' '.$this->meterNumber.'';
- $str .= ' '.$this->carrierCode.'';
- $str .= ' ';
- $str .= ' '.$this->dropoffType.'';
- $str .= ' '.$this->service.'';
- $str .= ' '.$this->packaging.'';
- $str .= ' '.$this->weightUnits.'';
- $str .= ' '.number_format($this->weight, 1, '.', '').'';
- $str .= ' ';
- $str .= ' '.$this->originStateOrProvinceCode.'';
- $str .= ' '.$this->originPostalCode.'';
- $str .= ' '.$this->originCountryCode.'';
- $str .= ' ';
- $str .= ' ';
- $str .= ' '.$this->destStateOrProvinceCode.'';
- $str .= ' '.$this->destPostalCode.'';
- $str .= ' '.$this->destCountryCode.'';
- $str .= ' ';
- $str .= ' ';
- $str .= ' '.$this->payorType.'';
- $str .= ' ';
- $str .= ' '.ceil(bcdiv(number_format($this->weight, 1, '.', ''), '150', 3)).'';
- $str .= ' ';
- //print($str);
- $header[] = "Host: www.smart-shop.com";
- $header[] = "MIME-Version: 1.0";
- $header[] = "Content-type: multipart/mixed; boundary=----doc";
- $header[] = "Accept: text/xml";
- $header[] = "Content-length: ".strlen($str);
- $header[] = "Cache-Control: no-cache";
- $header[] = "Connection: close \r\n";
- $header[] = $str;
-
- $ch = curl_init();
- //Disable certificate check.
- // uncomment the next line if you get curl error 60: error setting certificate verify locations
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- // uncommenting the next line is most likely not necessary in case of error 60
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
- //-------------------------
- //curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
- //curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
- //curl_setopt($ch, CURLOPT_CAINFO, "c:/ca-bundle.crt");
- //-------------------------
- curl_setopt($ch, CURLOPT_URL,$this->server);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_TIMEOUT, 4);
- curl_setopt($ch, CURLOPT_CUSTOMREQUEST,'POST');
- curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
-
- $data = curl_exec($ch);
- if (curl_errno($ch)) {
- $this->getPrice();
- } else {
- // close curl resource, and free up system resources
- curl_close($ch);
- $xmlParser = new xmlparser();
- $array = $xmlParser->GetXMLTree($data);
- //$xmlParser->printa($array);
- if(count($array['FDXRATEREPLY'][0]['ERROR'])) { // If it is error
- $error = new fedexError();
- $error->number = $array['FDXRATEREPLY'][0]['ERROR'][0]['CODE'][0]['VALUE'];
- $error->description = $array['FDXRATEREPLY'][0]['ERROR'][0]['MESSAGE'][0]['VALUE'];
- $error->response = $array;
- $this->error = $error;
- } else if (count($array['FDXRATEREPLY'][0]['ESTIMATEDCHARGES'][0]['DISCOUNTEDCHARGES'][0]['NETCHARGE'])) {
- $price = new fedexPrice();
- $price->rate = $array['FDXRATEREPLY'][0]['ESTIMATEDCHARGES'][0]['DISCOUNTEDCHARGES'][0]['NETCHARGE'][0]['VALUE'];
- $price->service = $this->serviceName;
- $price->response = $array;
- $this->price = $price;
- }
- //print_r($this);
- return $this;
- }
- }
-}
-class fedexError
-{
- var $number;
- var $description;
- var $response;
-}
-class fedexPrice
-{
- var $service;
- var $rate;
- var $response;
-}
-
diff --git a/gocart/libraries/shipping/fedex/lib_old/xmlparser.php b/gocart/libraries/shipping/fedex/lib_old/xmlparser.php
deleted file mode 100644
index eec9a82b..00000000
--- a/gocart/libraries/shipping/fedex/lib_old/xmlparser.php
+++ /dev/null
@@ -1,99 +0,0 @@
-GetChildren($vals, $i));
- } else {
- $children[$vals[$i]['tag']][] = $this->GetChildren($vals, $i);
- }
- break;
-
- case 'close':
- return $children;
- }
- }
- }
-
- function GetXMLTree($xml)
- {
- $data = $xml;
-
- $parser = xml_parser_create();
- xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
- xml_parse_into_struct($parser, $data, $vals, $index);
- xml_parser_free($parser);
-
- //print_r($index);
-
- $tree = array();
- $i = 0;
-
- if (isset($vals[$i]['attributes'])) {
- $tree[$vals[$i]['tag']][]['ATTRIBUTES'] = $vals[$i]['attributes'];
- $index = count($tree[$vals[$i]['tag']])-1;
- $tree[$vals[$i]['tag']][$index] = array_merge($tree[$vals[$i]['tag']][$index], $this->GetChildren($vals, $i));
- }
- else
- $tree[$vals[$i]['tag']][] = $this->GetChildren($vals, $i);
-
- return $tree;
- }
-
- function printa($obj) {
- global $__level_deep;
- if (!isset($__level_deep)) $__level_deep = array();
-
- if (is_object($obj))
- print '[obj]';
- elseif (is_array($obj)) {
- foreach(array_keys($obj) as $keys) {
- array_push($__level_deep, "[".$keys."]");
- $this->printa($obj[$keys]);
- array_pop($__level_deep);
- }
- }
- else print implode(" ",$__level_deep)." = $obj\n";
- }
-}
-?>
diff --git a/gocart/libraries/shipping/united_parcel_service/united_parcel_service.php b/gocart/libraries/shipping/united_parcel_service/united_parcel_service.php
deleted file mode 100644
index b79088d9..00000000
--- a/gocart/libraries/shipping/united_parcel_service/united_parcel_service.php
+++ /dev/null
@@ -1,270 +0,0 @@
-CI =& get_instance();
- $this->CI->load->model('Settings_model');
-
- // standard services
- $this->ups_services = array(
- '01' => 'UPS Next Day Air',
- '02' => 'UPS Second Day Air',
- '03' => 'UPS Ground',
- '07' => 'UPS Worldwide Express',
- '08' => 'UPS Worldwide Expedited',
- '11' => 'UPS Standard',
- '12' => 'UPS Three-Day Select',
- '13' => 'UPS Next Day Air Saver',
- '14' => 'UPS Next Day Air Early AM',
- '54' => 'UPS Worldwide Express Plus',
- '59' => 'UPS Second Day Air AM',
- '65' => 'UPS Saver'
- );
-
- }
-
-
- function rates( )
- {
-
- // load settings
- if($settings = $this->CI->Settings_model->get_settings('united_parcel_service')) {
- $access_key = $settings['access_key'];
- $ups_account_username = $settings['ups_account_username'];
- $ups_account_password = $settings['ups_account_password'];
- $enabled = $settings['enabled'];
- $services = explode(',', $settings['services']);
- $handling_method = $settings['handling_method'];
- $handling_amount = $settings['handling_amount'];
- } else {
- return array(); // no settings, no compute
- }
-
- $zip_code = $this->CI->config->item('zip');
- $customer = $this->CI->go_cart->customer();
- $weight = $this->CI->go_cart->order_weight();
- $currency = $this->CI->config->item('currency');
- $insured_value = $this->CI->go_cart->order_insurable_value();
-
- // shipping address will always be there
- $destination_zip = $customer['ship_address']['zip'];
-
-
- $data ="
-
- $access_key
- $ups_account_username
- $ups_account_password
-
-
-
-
-
- Rating and Service
- 1.0001
-
- Rate
- shop
-
-
- 01
-
-
-
-
- $zip_code
-
-
-
-
- $destination_zip
-
-
-
-
- 02
- Package
-
- Rate Shopping
-
- $weight
-
-
- $currency
- $insured_value
-
-
-
-
- ";
-
-
- $ch = curl_init("https://www.ups.com/ups.app/xml/Rate");
- curl_setopt($ch, CURLOPT_HEADER, 1);
- curl_setopt($ch,CURLOPT_POST,1);
- curl_setopt($ch,CURLOPT_TIMEOUT, 60);
- curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
- curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
- curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
- curl_setopt($ch,CURLOPT_POSTFIELDS,$data);
- $result=curl_exec ($ch);
-
- //die(print_r($result)); // uncomment to debug
-
- $data = strstr($result, '');
-
- $xml = new SimpleXMLElement($data);
- if($xml->Response->ResponseStatusCode == '1')
- {
- foreach($xml->RatedShipment as $shipping_choice)
- {
- // only display the ones the admin has chosen to show
- if(in_array($shipping_choice->Service->Code, $services))
- {
- $k = $this->ups_services[(string)$shipping_choice->Service->Code];
- $amount = (string)$shipping_choice->TotalCharges->MonetaryValue;
-
- if(is_numeric($handling_amount)) // valid entry?
- {
- if($handling_method=='$')
- {
- $amount += $handling_amount;
- }
- elseif($handling_method=='%')
- {
- $amount += $amount * ($handling_amount/100);
- }
- }
-
- $shipping_choices[$k] = $amount;
- }
- }
- return $shipping_choices;
- }
- else
- {
- //send back empty array on fail
- return array();
- }
- }
-
-
- function install()
- {
- $default_settings = array(
- 'access_key' => '',
- 'ups_account_username' => '',
- 'ups_account_password' => '',
- 'services' => '11',
- 'handling_method' => '$',
- 'handling_amount' => '5',
- 'enabled' => '0'
- );
- //set a default blank setting for flatrate shipping
- $this->CI->Settings_model->save_settings('united_parcel_service', $default_settings);
- }
-
- function uninstall()
- {
-
- $this->CI->Settings_model->delete_settings('united_parcel_service');
- }
-
- function form($post = false)
- {
-
- $this->CI->load->helper('form');
-
- //this same function processes the form
- if(!$post)
- {
- $settings = $this->CI->Settings_model->get_settings('united_parcel_service');
- $access_key = $settings['access_key'];
- $username = $settings['ups_account_username'];
- $password = $settings['ups_account_password'];
- $services = explode(',', $settings['services']);
- $handling_method = $settings['handling_method'];
- $handling_amount = $settings['handling_amount'];
- $enabled = $settings['enabled'];
- }
- else
- {
- $access_key = $post['access_key'];
- $username = $post['ups_account_username'];
- $password = $post['ups_account_password'];
- $services = $post['services'];
- $handling_method = $post['handling_method'];
- $handling_amount = $post['handling_amount'];
- $enabled = $post['enabled'];
- }
-
- $form = '';
- return $form;
- }
-
- function check()
- {
- $error = false;
-
- // no checking yet
-
- //count the errors
- if($error)
- {
- return $error;
- }
- else
- {
- $settings = $_POST;
- $settings['services'] = implode(',', $settings['services']);
-
- //we save the settings if it gets here
- $this->CI->Settings_model->save_settings('united_parcel_service', $settings);
-
- return false;
- }
- }
-
-}
\ No newline at end of file
diff --git a/gocart/migrations/001_gocart.php b/gocart/migrations/001_gocart.php
new file mode 100644
index 00000000..f1ebd56d
--- /dev/null
+++ b/gocart/migrations/001_gocart.php
@@ -0,0 +1,35 @@
+db->field_exists('heard_about', 'orders'))
+ {
+ $this->dbforge->drop_column('orders', 'heard_about');
+ }
+
+
+ //update the notes field to be NULL by default
+ $fields = array('notes'=>array( 'type' => 'text'
+ ,'null' => TRUE
+ )
+ );
+ $this->dbforge->modify_column('orders', $fields);
+
+ //update session ip_address to support ipv6 length
+ $fields = array('ip_address'=>array( 'type' => 'VARCHAR'
+ ,'constraint' => '45'
+ )
+ );
+ $this->dbforge->modify_column('sessions', $fields);
+
+ }
+
+ public function down()
+ {
+ //none of the changes should effect the product
+ }
+
+}
diff --git a/gocart/views/index.html b/gocart/migrations/index.html
similarity index 100%
rename from gocart/views/index.html
rename to gocart/migrations/index.html
diff --git a/gocart/models/box_model.php b/gocart/models/box_model.php
index b970cbfd..05897139 100644
--- a/gocart/models/box_model.php
+++ b/gocart/models/box_model.php
@@ -1,11 +1,6 @@
db->order_by('sequence ASC')->get('boxes')->result();
- $count = 1;
- foreach ($boxes as &$box)
+
+ $return = array();
+ foreach ($boxes as $box)
{
if ($box->enable_on == '0000-00-00')
{
@@ -49,22 +45,19 @@ function get_homepage_boxes($limit = false)
if (($enable_test && $enable_test > $curDate) || ($disable_test && $disable_test <= $curDate))
{
- unset($box);
+ //fails to make it. rewrite this if statement one day to work opposite of how it does.
}
else
{
- $count++;
+ $return[] = $box;
}
- if($limit)
+ if($limit && $limit <= count($return))
{
- if($count > $limit)
- {
- continue;
- }
+ break;
}
}
- return $boxes;
+ return $return;
}
function get_box($id)
diff --git a/gocart/models/cart_model.php b/gocart/models/cart_model.php
deleted file mode 100644
index 46822a47..00000000
--- a/gocart/models/cart_model.php
+++ /dev/null
@@ -1,78 +0,0 @@
-cart = $this->session->userdata('cart');
- }
-
- /********************************************************************
-
- ********************************************************************/
-
- function get_order($by='id', $string)
- {
- /*
- get_order() will only return the higher end order information
- it does not return order items or item options
-
- $by can be id, customer_id, or session_id
- */
- $this->db->where($id, $string);
- $result = $this->db->get('order');
- return $result->row();
- }
-
- function get_order_items($order_id)
- {
- $this->db_where('order_id', $id);
- $result = $this->db->get('order_items');
- return $result->results();
- }
-
- function get_order_item_options($item_id)
- {
- $this->db_where('item_id', $id);
- $result = $this->db->get('order_item_options');
- return $result->results();
- }
-
- function get_order_weight()
- {
- $order_weight = 0;
- foreach ($this->cart['content'] as $item)
- {
- $item_weight = $item['weight']*$item['quantity'];
- $order_weight = $order_weight + $item_weight;
- }
-
- return $order_weight;
- }
-
- function get_order_price()
- {
- $order_price = 0;
- foreach ($this->cart['content'] as $item)
- {
- $item_price = $item['price']*$item['quantity'];
- $order_price = $order_price + $item_price;
- }
-
- return $order_price;
- }
-
- function get_total()
- {
- $order_price = $this->get_order_price();
- $tax = $this->cart['taxes'];
- $shipping = $this->cart['shipping'];
- $discount = isset($this->cart['coupon_discount']) ? $this->cart['coupon_discount'] : 0;
-
- $total = ($order_price + $tax + $shipping) - $discount;
-
- return number_format($total, '2');
- }
-}
-?>
diff --git a/gocart/models/category_model.php b/gocart/models/category_model.php
index 3e572af5..121c7100 100644
--- a/gocart/models/category_model.php
+++ b/gocart/models/category_model.php
@@ -6,7 +6,7 @@ function get_categories($parent = false)
{
if ($parent !== false)
{
- $this->db->where("parent_id = $parent");
+ $this->db->where('parent_id', $parent);
}
$this->db->select('id');
$this->db->order_by('categories.sequence', 'ASC');
@@ -37,6 +37,11 @@ function get_categories_tierd($parent=0)
return $categories;
}
+ function category_autocomplete($name, $limit)
+ {
+ return $this->db->like('name', $name)->get('categories', $limit)->result();
+ }
+
function get_category($id)
{
return $this->db->get_where('categories', array('id'=>$id))->row();
diff --git a/gocart/models/customer_model.php b/gocart/models/customer_model.php
old mode 100755
new mode 100644
index fcfec269..1c4084a6
--- a/gocart/models/customer_model.php
+++ b/gocart/models/customer_model.php
@@ -3,7 +3,7 @@
{
//this is the expiration for a non-remember session
- var $session_expire = 600;
+ var $session_expire = 7200;
function __construct()
@@ -184,7 +184,7 @@ function login($email, $password, $remember=false)
$this->db->select('*');
$this->db->where('email', $email);
$this->db->where('active', 1);
- $this->db->where('password', $this->encrypt->sha1($password));
+ $this->db->where('password', sha1($password));
$this->db->limit(1);
$result = $this->db->get('customers');
$customer = $result->row_array();
@@ -290,7 +290,7 @@ function is_logged_in($redirect = false, $default_redirect = 'secure/login/')
if($default_redirect)
{
- redirect('login');
+ redirect('secure/login');
}
return false;
@@ -321,7 +321,7 @@ function reset_password($email)
$this->load->library('email');
$new_password = random_string('alnum', 8);
- $customer['password'] = $this->encrypt->sha1($new_password);
+ $customer['password'] = sha1($new_password);
$this->save($customer);
$this->email->from($this->config->item('email'), $this->config->item('site_name'));
@@ -374,6 +374,4 @@ function save_group($data)
return $this->db->insert_id();
}
}
-
-
-}
+}
\ No newline at end of file
diff --git a/gocart/models/digital_product_model.php b/gocart/models/digital_product_model.php
new file mode 100644
index 00000000..c37c0d40
--- /dev/null
+++ b/gocart/models/digital_product_model.php
@@ -0,0 +1,247 @@
+lang->load('digital_product');
+ }
+
+ // Return blank record array
+ function new_file()
+ {
+ return array(
+ 'id'=>'',
+ 'filename'=>'',
+ 'max_downloads'=>'',
+ 'title'=>'',
+ 'description'=>'',
+ 'size'=>''
+ );
+ }
+
+ // Get files list
+ function get_list()
+ {
+
+ $list = $this->db->get('digital_products')->result();
+
+ foreach($list as &$file)
+ {
+ // identify if the record is missing it's file content
+ $file->verified = $this->verify_content($file->filename);
+ }
+
+ return $list;
+ }
+
+ // Get file record
+ function get_file_info($id)
+ {
+ return $this->db->where('id', $id)->get('digital_products')->row();
+ }
+
+ // Verify upload path
+ function verify_file_path()
+ {
+ return is_writable('uploads/digital_products');
+ }
+
+ // Verify file content
+ function verify_content($filename)
+ {
+ return file_exists('uploads/digital_products'.'/'.$filename);
+ }
+
+ // Save/Update file record
+ function save($data)
+ {
+ if(isset($data['id']))
+ {
+ $this->db->where('id', $data['id'])->update('digital_products', $data);
+ return $data['id'];
+ } else {
+ $this->db->insert('digital_products', $data);
+ return $this->db->insert_id();
+ }
+ }
+
+ // Add product association
+ function associate($file_id, $product_id)
+ {
+ $this->db->insert('products_files', array('product_id'=>$product_id, 'file_id'=>$file_id));
+ }
+
+ // Remove product association (all or by product)
+ function disassociate($file_id, $product_id=false)
+ {
+
+ if($product_id)
+ {
+ $data['product_id'] = $product_id;
+ }
+ if($file_id)
+ {
+ $data['file_id'] = $file_id;
+ }
+ $this->db->where($data)->delete('products_files');
+ }
+
+ function get_associations_by_file($id)
+ {
+ return $this->db->where('file_id', $id)->get('products_files')->result();
+ }
+
+ function get_associations_by_product($product_id)
+ {
+ return $this->db->where('product_id', $product_id)->get('products_files')->result();
+ }
+
+ // Delete file record & content
+ function delete($id)
+ {
+ $this->load->model('product_model');
+
+ $info = $this->get_file_info($id);
+
+ if(!$info)
+ {
+ return false;
+ }
+
+ // remove file
+ if($this->verify_content($info->filename))
+ {
+ unlink('uploads/digital_products/'.$info->filename);
+ }
+
+ // Disable products that are associated with this file
+ // to prevent users purchasing a product with deleted media
+ $product_associations = $this->get_associations_by_file($id);
+ foreach($product_associations as $p)
+ {
+ $save['id'] = $p->product_id;
+ $save['enabled'] = 0;
+ $this->product_model->save($save);
+ }
+
+ // Remove db associations
+ $this->db->where('id', $id)->delete('digital_products');
+ $this->disassociate($id);
+ }
+
+ // Accepts an array of file lists for products purchased
+ // and sets up the list of available downloads for the customer
+ // uses customer id if available, also creates a package code
+ // that can be sent to non registered customers
+ function add_download_package($package, $order_id)
+ {
+ // get customer stuff
+ $customer = $this->go_cart->customer();
+ if(!empty($customer['id']))
+ {
+ $new_package['customer_id'] = $customer['id'];
+ } else {
+ $new_package['customer_id'] = 0;
+ }
+
+ $new_package['order_id'] = $order_id;
+ $new_package['code'] = generate_code();
+
+ // save master package record
+ $this->db->insert('download_packages',$new_package);
+
+ $package_id = $this->db->insert_id();
+
+ // save the db data here
+ $files_list = array();
+
+ // use this to prevent inserting duplicates
+ // in case a file is shared across products
+ $ids = array();
+
+ // build files records list
+ foreach($package as $product_list)
+ {
+ foreach($product_list as $f)
+ {
+ if(!isset($ids[$f->file_id]))
+ {
+ $file['package_id'] = $package_id;
+ $file['file_id'] = $f->file_id;
+ $file['link'] = md5($f->file_id . time() . $new_package['customer_id']); // create a unique download key for each file
+
+ $files_list[] = $file;
+ }
+ }
+ }
+
+ $this->db->insert_batch('download_package_files', $files_list);
+
+ // save the master record to include links in the order email
+ $this->go_cart->save_order_downloads($new_package);
+ }
+
+ // Retrieve user's download packages
+ // send back an array indexed by order number
+ function get_user_downloads($customer_id)
+ {
+ $result = $this->db->where('customer_id', $customer_id)->get('download_packages')->result();
+
+ $downloads = array();
+ foreach($result as $r)
+ {
+ $downloads[$r->order_id] = $this->get_package_files($r->id);
+ }
+
+ return $downloads;
+ }
+
+ // Retrieve non-member download by code
+ // format array exactly as by user
+ function get_downloads_by_code($code)
+ {
+ $row = $this->db->where('code', $code)->get('download_packages')->row();
+
+ if($row)
+ {
+ return array(
+ $row->order_id => $this->get_package_files($row->id)
+ );
+ }
+ }
+
+ // get the files in a package
+ function get_package_files($package_id)
+ {
+
+ return $this->db->select('*')
+ ->from('download_package_files as a')
+ ->join('digital_products as b', 'a.file_id=b.id')
+ ->where('package_id', $package_id)
+ ->get()
+ ->result();
+ }
+
+ // get file info for download by the link code
+ // increment the download counter
+ function get_file_info_by_link($link)
+ {
+
+ $record = $this->db->from('digital_products as a')
+ ->join('download_package_files as b', 'a.id=b.file_id')
+ ->where('link', $link)
+ ->get()
+ ->row();
+
+ return $record;
+
+ }
+
+
+ function touch_download($link)
+ {
+ $this->db->where('link', $link)->set('downloads','downloads+1', false)->update('download_package_files');
+ }
+}
\ No newline at end of file
diff --git a/gocart/models/gift_card_model.php b/gocart/models/gift_card_model.php
old mode 100755
new mode 100644
index 7f2e282c..6611cbdf
--- a/gocart/models/gift_card_model.php
+++ b/gocart/models/gift_card_model.php
@@ -119,26 +119,16 @@ function is_active($code)
$this->db->where('code', $code);
$res = $this->db->get('gift_cards');
$row = $res->row();
- return (bool) $row->activated;
- }
-
- // use a run-of-the-mill pw generator as a code generator
- function generate_password($length=16) {
- $vowels = '0123';
- $consonants = '456789ABCDEF';
-
- $password = '';
- $alt = time() % 2;
- for ($i = 0; $i < $length; $i++) {
- if ($alt == 1) {
- $password .= $consonants[(rand() % strlen($consonants))];
- $alt = 0;
- } else {
- $password .= $vowels[(rand() % strlen($vowels))];
- $alt = 1;
- }
+ if($row)
+ {
+ return (bool) $row->activated;
}
- return $password;
+ else
+ {
+ return false;
+ }
+
}
+
}
\ No newline at end of file
diff --git a/gocart/models/option_model.php b/gocart/models/option_model.php
old mode 100755
new mode 100644
index 883ba2e4..80c602c6
--- a/gocart/models/option_model.php
+++ b/gocart/models/option_model.php
@@ -69,6 +69,8 @@ function save_option($option, $values)
{
$value['option_id'] = $id;
$value['sequence'] = $sequence;
+ $value['weight'] = floatval($value['weight']);
+ $value['price'] = floatval($value['price']);
$sequence++;
$this->db->insert('option_values', $value);
diff --git a/gocart/models/order_model.php b/gocart/models/order_model.php
index 35eb0696..e0dbdd88 100644
--- a/gocart/models/order_model.php
+++ b/gocart/models/order_model.php
@@ -6,6 +6,37 @@ function __construct()
parent::__construct();
}
+ function get_gross_monthly_sales($year)
+ {
+ $this->db->select('SUM(coupon_discount) as coupon_discounts');
+ $this->db->select('SUM(gift_card_discount) as gift_card_discounts');
+ $this->db->select('SUM(subtotal) as product_totals');
+ $this->db->select('SUM(shipping) as shipping');
+ $this->db->select('SUM(tax) as tax');
+ $this->db->select('SUM(total) as total');
+ $this->db->select('YEAR(ordered_on) as year');
+ $this->db->select('MONTH(ordered_on) as month');
+ $this->db->group_by(array('MONTH(ordered_on)'));
+ $this->db->order_by("ordered_on", "desc");
+ $this->db->where('YEAR(ordered_on)', $year);
+
+ return $this->db->get('orders')->result();
+ }
+
+ function get_sales_years()
+ {
+ $this->db->order_by("ordered_on", "desc");
+ $this->db->select('YEAR(ordered_on) as year');
+ $this->db->group_by('YEAR(ordered_on)');
+ $records = $this->db->get('orders')->result();
+ $years = array();
+ foreach($records as $r)
+ {
+ $years[] = $r->year;
+ }
+ return $years;
+ }
+
function get_orders($search=false, $sort_by='', $sort_order='DESC', $limit=0, $offset=0)
{
if ($search)
@@ -172,7 +203,7 @@ function delete($id)
$this->db->delete('orders');
//now delete the order items
- $this->db->where('id', $id);
+ $this->db->where('order_id', $id);
$this->db->delete('order_items');
}
@@ -212,8 +243,10 @@ function save_order($data, $contents = false)
// update order items
foreach($contents as $item)
{
- $save = array();
+ $save = array();
$save['contents'] = $item;
+
+ $item = unserialize($item);
$save['product_id'] = $item['id'];
$save['quantity'] = $item['quantity'];
$save['order_id'] = $id;
@@ -225,22 +258,6 @@ function save_order($data, $contents = false)
}
- function save_item($data)
- {
- if (isset($data['id']) && $data['id'] != 0)
- {
- $this->db->where('id', $data['id']);
- $this->db->update('items', $data);
-
- return $data['id'];
- }
- else
- {
- $this->db->insert('items', $data);
- return $this->db->insert_id();
- }
- }
-
function get_best_sellers($start, $end)
{
if(!empty($start))
diff --git a/gocart/models/page_model.php b/gocart/models/page_model.php
index 0a4ca44f..2d95f77f 100644
--- a/gocart/models/page_model.php
+++ b/gocart/models/page_model.php
@@ -1,11 +1,7 @@
session->userdata('cart');
-
-
- $customer = $cart['customer'];
-
- $post_url = "https://test.authorize.net/gateway/transact.dll";
- $post_values = array(
-
- // the API Login ID and Transaction Key must be replaced with valid values
- "x_login" => $this->config->item('x_login'),
- "x_tran_key" => $this->config->item('x_tran_key'),
-
- "x_version" => "3.1",
- "x_delim_data" => "TRUE",
- "x_delim_char" => "|",
- "x_relay_response" => "FALSE",
-
- "x_type" => "AUTH_CAPTURE",
- "x_method" => "CC",
- "x_card_num" => "4111111111111111",
- "x_exp_date" => "0115",
-
- "x_amount" => "19.99",
- "x_description" => "Sample Transaction",
-
- "x_first_name" => $customer['firstname'],
- "x_last_name" => $customer['lastname'],
- "x_address" => $customer['bill_address1'].' '.$customer['bill_address2'],
- "x_state" => $customer['bill_state'],
- "x_zip" => $customer['bill_zip']
- // Additional fields can be added here as outlined in the AIM integration
- // guide at: http://developer.authorize.net
- );
- $post_string = "";
- foreach( $post_values as $key => $value )
- { $post_string .= "$key=" . urlencode( $value ) . "&"; }
- $post_string = rtrim( $post_string, "& " );
-
-
- $request = curl_init($post_url); // initiate curl object
- curl_setopt($request, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response
- curl_setopt($request, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)
- curl_setopt($request, CURLOPT_POSTFIELDS, $post_string); // use HTTP POST to send form data
- curl_setopt($request, CURLOPT_SSL_VERIFYPEER, FALSE); // uncomment this line if you get no gateway response.
- $post_response = curl_exec($request); // execute curl post and store results in $post_response
- // additional options may be required depending upon your server configuration
- // you can find documentation on curl options at http://www.php.net/curl_setopt
- curl_close ($request); // close curl object
-
- // This line takes the response and breaks it into an array using the specified delimiting character
- $response_array = explode($post_values["x_delim_char"],$post_response);
- }
-}
-?>
diff --git a/gocart/models/product_model.php b/gocart/models/product_model.php
old mode 100755
new mode 100644
index 17d05745..345afbaf
--- a/gocart/models/product_model.php
+++ b/gocart/models/product_model.php
@@ -12,17 +12,104 @@ function __construct()
// check for possible group discount
$customer = $this->session->userdata('customer');
- if(isset($customer['group_discount_formula'])) $this->group_discount_formula = $customer['group_discount_formula'];
+ if(isset($customer['group_discount_formula']))
+ {
+ $this->group_discount_formula = $customer['group_discount_formula'];
+ }
}
-
- function get_products($category_id = false, $limit = false, $offset = false)
+
+ function product_autocomplete($name, $limit)
+ {
+ return $this->db->like('name', $name)->get('products', $limit)->result();
+ }
+
+ function products($data=array(), $return_count=false)
+ {
+ if(empty($data))
+ {
+ //if nothing is provided return the whole shabang
+ $this->get_all_products();
+ }
+ else
+ {
+ //grab the limit
+ if(!empty($data['rows']))
+ {
+ $this->db->limit($data['rows']);
+ }
+
+ //grab the offset
+ if(!empty($data['page']))
+ {
+ $this->db->offset($data['page']);
+ }
+
+ //do we order by something other than category_id?
+ if(!empty($data['order_by']))
+ {
+ //if we have an order_by then we must have a direction otherwise KABOOM
+ $this->db->order_by($data['order_by'], $data['sort_order']);
+ }
+
+ //do we have a search submitted?
+ if(!empty($data['term']))
+ {
+ $search = json_decode($data['term']);
+ //if we are searching dig through some basic fields
+ if(!empty($search->term))
+ {
+ $this->db->like('name', $search->term);
+ $this->db->or_like('description', $search->term);
+ $this->db->or_like('excerpt', $search->term);
+ $this->db->or_like('sku', $search->term);
+ }
+
+ if(!empty($search->category_id))
+ {
+ //lets do some joins to get the proper category products
+ $this->db->join('category_products', 'category_products.product_id=products.id', 'right');
+ $this->db->where('category_products.category_id', $search->category_id);
+ $this->db->order_by('sequence', 'ASC');
+ }
+ }
+
+ if($return_count)
+ {
+ return $this->db->count_all_results('products');
+ }
+ else
+ {
+ return $this->db->get('products')->result();
+ }
+
+ }
+ }
+
+ function get_all_products()
+ {
+ //sort by alphabetically by default
+ $this->db->order_by('name', 'ASC');
+ $result = $this->db->get('products');
+ //apply group discount
+ $return = $result->result();
+ if($this->group_discount_formula)
+ {
+ foreach($return as &$product) {
+ eval('$product->price=$product->price'.$this->group_discount_formula.';');
+ }
+ }
+ return $return;
+ }
+
+ function get_products($category_id = false, $limit = false, $offset = false, $by=false, $sort=false)
{
//if we are provided a category_id, then get products according to category
if ($category_id)
{
- $this->db->order_by('sequence', 'ASC');
- $result = $this->db->get_where('category_products', array('category_id'=>$category_id), $limit, $offset);
- $result = $result->result();
+ $this->db->select('category_products.*, LEAST(IFNULL(NULLIF(saleprice, 0), price), price) as sort_price', false)->from('category_products')->join('products', 'category_products.product_id=products.id')->where(array('category_id'=>$category_id, 'enabled'=>1));
+ $this->db->order_by($by, $sort);
+
+ $result = $this->db->limit($limit)->offset($offset)->get()->result();
$contents = array();
$count = 0;
@@ -50,43 +137,65 @@ function get_products($category_id = false, $limit = false, $offset = false)
}
return $return;
}
-
}
-
+
+ function count_all_products()
+ {
+ return $this->db->count_all_results('products');
+ }
+
function count_products($id)
{
- $this->db->where('category_id', $id);
- return $this->db->count_all_results('category_products');
+ return $this->db->select('product_id')->from('category_products')->join('products', 'category_products.product_id=products.id')->where(array('category_id'=>$id, 'enabled'=>1))->count_all_results();
}
- function get_product($id, $sub=true)
+ function get_product($id, $related=true)
{
$result = $this->db->get_where('products', array('id'=>$id))->row();
if(!$result)
{
return false;
}
+
+ $related = json_decode($result->related_products);
- $result->categories = $this->get_product_categories($result->id);
+ if(!empty($related))
+ {
+ //build the where
+ $where = false;
+ foreach($related as $r)
+ {
+ if(!$where)
+ {
+ $this->db->where('id', $r);
+ }
+ else
+ {
+ $this->db->or_where('id', $r);
+ }
+ $where = true;
+ }
+ $result->related_products = $this->db->get('products')->result();
+ }
+ else
+ {
+ $result->related_products = array();
+ }
+ $result->categories = $this->get_product_categories($result->id);
+
// group discount?
if($this->group_discount_formula)
{
eval('$result->price=$result->price'.$this->group_discount_formula.';');
}
+
return $result;
}
function get_product_categories($id)
{
- $cats = $this->db->where('product_id', $id)->get('category_products')->result();
-
- $categories = array();
- foreach ($cats as $c)
- {
- $categories[] = $c->category_id;
- }
- return $categories;
+ return $this->db->where('product_id', $id)->join('categories', 'category_id = categories.id')->get('category_products')->result();
}
function get_slug($id)
@@ -160,8 +269,15 @@ function save($product, $options=false, $categories=false)
//get all the categories that the product is in
$cats = $this->get_product_categories($id);
- //eliminate categories that products are no longer in
+ //generate cat_id array
+ $ids = array();
foreach($cats as $c)
+ {
+ $ids[] = $c->id;
+ }
+
+ //eliminate categories that products are no longer in
+ foreach($ids as $c)
{
if(!in_array($c, $categories))
{
@@ -172,7 +288,7 @@ function save($product, $options=false, $categories=false)
//add products to new categories
foreach($categories as $c)
{
- if(!in_array($c, $cats))
+ if(!in_array($c, $ids))
{
$this->db->insert('category_products', array('product_id'=>$id,'category_id'=>$c));
}
@@ -213,71 +329,66 @@ function add_product_to_category($product_id, $optionlist_id, $sequence)
$this->db->insert('product_categories', array('product_id'=>$product_id, 'category_id'=>$category_id, 'sequence'=>$sequence));
}
- function search_products($term, $limit=false, $offset=false)
+ function search_products($term, $limit=false, $offset=false, $by=false, $sort=false)
{
$results = array();
-
- //I know this is the round about way of doing things and is not the fastest. but it is thus far the easiest.
-
+
+ $this->db->select('*, LEAST(IFNULL(NULLIF(saleprice, 0), price), price) as sort_price', false);
//this one counts the total number for our pagination
- $this->db->like('name', $term);
- $this->db->or_like('description', $term);
- $this->db->or_like('excerpt', $term);
- $this->db->or_like('sku', $term);
+ $this->db->where('enabled', 1);
+ $this->db->where('(name LIKE "%'.$term.'%" OR description LIKE "%'.$term.'%" OR excerpt LIKE "%'.$term.'%" OR sku LIKE "%'.$term.'%")');
$results['count'] = $this->db->count_all_results('products');
+
+ $this->db->select('*, LEAST(IFNULL(NULLIF(saleprice, 0), price), price) as sort_price', false);
//this one gets just the ones we need.
- $this->db->like('name', $term);
- $this->db->or_like('description', $term);
- $this->db->or_like('excerpt', $term);
- $this->db->or_like('sku', $term);
+ $this->db->where('enabled', 1);
+ $this->db->where('(name LIKE "%'.$term.'%" OR description LIKE "%'.$term.'%" OR excerpt LIKE "%'.$term.'%" OR sku LIKE "%'.$term.'%")');
+
+ if($by && $sort)
+ {
+ $this->db->order_by($by, $sort);
+ }
+
$results['products'] = $this->db->get('products', $limit, $offset)->result();
+
return $results;
}
// Build a cart-ready product array
function get_cart_ready_product($id, $quantity=false)
{
+ $product = $this->db->get_where('products', array('id'=>$id))->row();
- $db_product = $this->get_product($id);
- if( ! $db_product)
+ //unset some of the additional fields we don't need to keep
+ if(!$product)
{
return false;
}
- $product = array();
+ $product->base_price = $product->price;
+
+ if ($product->saleprice != 0.00)
+ {
+ $product->price = $product->saleprice;
+ }
- if ($db_product->saleprice == 0.00) {
- $product['price'] = $db_product->price;
+
+ // Some products have n/a quantity, such as downloadables
+ //overwrite quantity of the product with quantity requested
+ if (!$quantity || $quantity <= 0 || $product->fixed_quantity==1)
+ {
+ $product->quantity = 1;
}
else
{
- $product['price'] = $db_product->saleprice;
+ $product->quantity = $quantity;
}
- $product['base_price'] = $product['price']; // price gets modified by options, show the baseline still...
- $product['id'] = $db_product->id;
- $product['name'] = $db_product->name;
- $product['sku'] = $db_product->sku;
- $product['excerpt'] = $db_product->excerpt;
- $product['weight'] = $db_product->weight;
- $product['shippable'] = $db_product->shippable;
- $product['in_stock'] = $db_product->in_stock;
- $product['options'] = array();
-
- // Some products have n/a quantity, such as downloadables
- if($db_product->shippable==1)
- {
- // no negs || non-shippable products qty is n/a
- if (!$quantity || $quantity <= 0)
- {
- $product['quantity'] = 1;
- } else {
- $product['quantity'] = $quantity;
- }
- } // end qty segment
+ // attach list of associated downloadables
+ $product->file_list = $this->Digital_Product_model->get_associations_by_product($id);
- return $product;
+ return (array)$product;
}
}
\ No newline at end of file
diff --git a/gocart/models/shipping_model.php b/gocart/models/shipping_model.php
deleted file mode 100644
index 2f5b0518..00000000
--- a/gocart/models/shipping_model.php
+++ /dev/null
@@ -1,64 +0,0 @@
- '85.00'
- ,'70' => '65.00'
- ,'60' => '55.00'
- ,'50' => '55.00'
- ,'40' => '45.00'
- ,'30' => '35.00'
- ,'20' => '25.00'
- ,'10' => '15.00'
- ,'0' => '5.00'
- );
-
-
- if ($method == 'weight')
- {
- $order_weight = $this->get_order_weight();
- $shipping_price = '';
- foreach ($table as $weight => $rate)
- {
- $shipping_price = $rate;
- if($weight <= $order_weight)
- {
- break;
- }
- }
- echo $order_weight;
- return $shipping_price;
- }
- elseif ($method == 'price')
- {
- $order_price = $this->get_order_price();
- $shipping_price = '';
- foreach ($table as $price => $rate)
- {
- $shipping_price = $rate;
- if($price <= $order_price)
- {
- break;
- }
- }
- return $shipping_price;
- }
- }
-}
-?>
diff --git a/gocart/models/tax_model.php b/gocart/models/tax_model.php
index 9b792327..f31c1eac 100644
--- a/gocart/models/tax_model.php
+++ b/gocart/models/tax_model.php
@@ -75,7 +75,7 @@ function get_tax_total()
$tax_total = 0;
$tax_total = $tax_total + $this->get_taxes();
- return number_format($tax_total, 2, '.', ',');
+ return number_format($tax_total, 2, '.', '');
}
function get_tax_rate()
diff --git a/gocart/third_party/.htaccess b/gocart/packages/.htaccess
similarity index 100%
rename from gocart/third_party/.htaccess
rename to gocart/packages/.htaccess
diff --git a/gocart/packages/index.html b/gocart/packages/index.html
new file mode 100644
index 00000000..c942a79c
--- /dev/null
+++ b/gocart/packages/index.html
@@ -0,0 +1,10 @@
+
+
+ 403 Forbidden
+
+
+
+Directory access is forbidden.
+
+
+
\ No newline at end of file
diff --git a/gocart/packages/payment/authorize_net/language/english/authorize_net_lang.php b/gocart/packages/payment/authorize_net/language/english/authorize_net_lang.php
new file mode 100644
index 00000000..ceb09f57
--- /dev/null
+++ b/gocart/packages/payment/authorize_net/language/english/authorize_net_lang.php
@@ -0,0 +1,29 @@
+CI =& get_instance();
$this->CI->load->helper("credit_card");
- $this->CI->load->library('session');
- $this->CI->load->library('payment/authorize_net/authorize_net_lib');
+ $this->CI->load->library('authorize_net_lib');
+ $this->CI->lang->load('authorize_net');
}
@@ -30,46 +30,43 @@ function checkout_form($post = false)
$enabled = $settings['enabled'];
$form = array();
+ $form['name'] = $this->method_name;
// Retrieve any previously stored cc data to redisplay in case of errors
$cc_data = $this->CI->session->userdata('cc_data');
if($enabled)
{
- $form['name'] = $this->method_name;
- //retrieve cc form
- ob_start();
- include(APPPATH."libraries/payment/authorize_net/forms/customer_card.php");
- $form['form'] = ob_get_contents();
- ob_end_clean();
+ $form['form'] = $this->CI->load->view('customer_card', array('cc_data'=>$cc_data), true);
+
+ return $form;
} else return array();
- return $form;
}
function checkout_check()
{
- $error_msg = "Please fix the following errors:
diff --git a/gocart/libraries/payment/authorize_net/forms/customer_card.php b/gocart/packages/payment/authorize_net/views/customer_card.php
similarity index 89%
rename from gocart/libraries/payment/authorize_net/forms/customer_card.php
rename to gocart/packages/payment/authorize_net/views/customer_card.php
index b499c669..71fb304b 100644
--- a/gocart/libraries/payment/authorize_net/forms/customer_card.php
+++ b/gocart/packages/payment/authorize_net/views/customer_card.php
@@ -5,7 +5,7 @@
The JavaScript Source!! http://javascript.internet.com
Created by: David Leppek :: https://www.azcode.com/Mod10
-Basically, the alorithum takes each digit, from right to left and muliplies each second
+Basically, the alorithm takes each digit, from right to left and muliplies each second
digit by two. If the multiple is two-digits long (i.e.: 6 * 2 = 12) the two digits of
the multiple are then added together for a new number (1 + 2 = 3). You then add up the
string of numbers, both unaltered and new values and get a total sum. This sum is then
@@ -89,7 +89,7 @@ function Mod10(ccNumb) { // v2.0
{
$('#card_num').addClass('require_fail');
errors = true;
- display_error('payment', 'Credit card does not appear to be a valid number');
+ display_error('payment', '') ;
}
// validate other fields
$('.pmt_required').each(function(){
@@ -97,7 +97,7 @@ function Mod10(ccNumb) { // v2.0
{
$(this).addClass('require_fail');
errors = true;
- display_error('payment', 'Please complete all required fields.');
+ display_error('payment', '');
}
});
@@ -117,21 +117,21 @@ function Mod10(ccNumb) { // v2.0
\ No newline at end of file
diff --git a/gocart/libraries/payment/authorize_net/forms/cvv.png b/gocart/packages/payment/authorize_net/views/cvv.png
similarity index 100%
rename from gocart/libraries/payment/authorize_net/forms/cvv.png
rename to gocart/packages/payment/authorize_net/views/cvv.png
diff --git a/gocart/packages/payment/cod/language/english/cod_lang.php b/gocart/packages/payment/cod/language/english/cod_lang.php
new file mode 100644
index 00000000..f56fca35
--- /dev/null
+++ b/gocart/packages/payment/cod/language/english/cod_lang.php
@@ -0,0 +1,4 @@
+CI =& get_instance();
- $this->CI->load->library('session');
+ $this->CI->lang->load('cod');
+
+ $this->method_name = lang('charge_on_delivery');
}
/*
@@ -53,7 +55,7 @@ function description()
from the same place as the checkout_check above.
*/
- return 'Charge on Delivery';
+ return lang('charge_on_delivery');
/*
for a credit card, this may look something like
@@ -84,7 +86,7 @@ function process_payment()
//process the payment here, if it goes through return false if it breaks down, return an error message
if($process)
{
- return 'There was an error processing your payment';
+ return lang('processing_error');
}
else
{
@@ -106,22 +108,18 @@ function form($post = false)
$enabled = $post['enabled'];
}
- $form = '
- Enabled: | |
-
';
+ ob_start();
+ ?>
+
+
+
+ CI =& get_instance();
$this->CI->load->library('session');
- $this->CI->load->library('payment/paypal_express/paypal');
- $this->CI->load->library('payment/paypal_express/httprequest');
+ $this->CI->load->library('paypal');
+ $this->CI->load->library('httprequest');
+ $this->CI->lang->load('paypal_express');
+
+ $this->method_name = lang('paypal_express');
}
/*
@@ -31,16 +34,14 @@ function checkout_form($post = false)
$form = array();
if($enabled)
{
- $form['name'] = $this->method_name;
+ $form['name'] = $this->method_name;
+
+ $form['form'] = $this->CI->load->view('pp_checkout', array(), true);
+
+ return $form;
- //retrieve form contents
- ob_start();
- include(APPPATH."libraries/payment/paypal_express/forms/checkout.php");
- $form['form'] = ob_get_contents();
- ob_end_clean();
} else return array();
- return $form;
}
@@ -52,23 +53,25 @@ function checkout_check()
function description()
{
- return 'Paypal Express';
+ return lang('paypal_express');
}
//back end installation functions
function install()
{
- $config['username'] = "Paypal username";
- $config['password'] = "Paypal password";
- $config['signature'] = "Paypal API signature";
- $config['currency'] = "USD";
+ $config['username'] = '';
+ $config['password'] = '';;
+ $config['signature'] = '';
+ $config['currency'] = 'USD'; // default
- $config['return_url'] = "pp_gate/pp_return/";
- $config['cancel_url'] = "pp_gate/pp_cancel/";
$config['SANDBOX'] = true;
$config['enabled'] = "0";
+
+ //not normally user configurable
+ $config['return_url'] = "pp_gate/pp_return/";
+ $config['cancel_url'] = "pp_gate/pp_cancel/";
$this->CI->Settings_model->save_settings('paypal_express', $config);
}
@@ -89,7 +92,7 @@ function process_payment()
$this->CI->paypal->doExpressCheckout($this->CI->go_cart->total(), $store.' order');
// If we get to this step at all, something went wrong
- return 'There was an error processing your payment through PayPal';
+ return lang('paypal_error');
}
@@ -100,20 +103,13 @@ function form($post = false)
if(!$post)
{
$settings = $this->CI->Settings_model->get_settings('paypal_express');
- $enabled = $settings['enabled'];
}
else
{
$settings = $post;
- $enabled = $settings['enabled'];
}
//retrieve form contents
- ob_start();
- include(APPPATH."libraries/payment/paypal_express/forms/admin_form.php");
- $form = ob_get_contents();
- ob_end_clean();
-
- return $form;
+ return $this->CI->load->view('paypal_express_form', array('settings'=>$settings), true);
}
function check()
@@ -138,3 +134,4 @@ function check()
}
}
}
+
diff --git a/gocart/packages/payment/paypal_express/views/paypal_express_form.php b/gocart/packages/payment/paypal_express/views/paypal_express_form.php
new file mode 100644
index 00000000..74050c77
--- /dev/null
+++ b/gocart/packages/payment/paypal_express/views/paypal_express_form.php
@@ -0,0 +1,18 @@
+
+
+
+
+
+" />
+
+
+" size="50" >
+
+
+" size="50">
+
+
+" size="50" />
diff --git a/gocart/libraries/payment/paypal_express/forms/checkout.php b/gocart/packages/payment/paypal_express/views/pp_checkout.php
similarity index 50%
rename from gocart/libraries/payment/paypal_express/forms/checkout.php
rename to gocart/packages/payment/paypal_express/views/pp_checkout.php
index dad84289..c8c55bbe 100644
--- a/gocart/libraries/payment/paypal_express/forms/checkout.php
+++ b/gocart/packages/payment/paypal_express/views/pp_checkout.php
@@ -3,6 +3,6 @@
 |
- Using this method, you will be directed to the Paypal website to verify your payment. Once your payment is authorized, you will be directed back to our website and your order will be complete. |
+ |
diff --git a/gocart/packages/payment/sage_pay/language/english/sage_pay_lang.php b/gocart/packages/payment/sage_pay/language/english/sage_pay_lang.php
new file mode 100644
index 00000000..6bd1ab3d
--- /dev/null
+++ b/gocart/packages/payment/sage_pay/language/english/sage_pay_lang.php
@@ -0,0 +1,58 @@
+(as shown on card)';
+$lang['card_type'] = 'Card Type';
+$lang['card_number'] = 'Card Number';
+$lang['valid_from'] = 'Valid From';
+$lang['expires_on'] = 'Expires On';
+$lang['cvv_code'] = 'CVV Code';
+
+$lang['fix_errors'] = 'Please fix the following errors:';
+$lang['enter_name'] = 'Please enter your full name as shown on the card';
+$lang['fix_exp_date'] = 'The expiration date does not appear to be valid';
+$lang['fix_card_num'] = 'The card number you entered is not a valid credit card number';
+$lang['enter_cvv'] = 'Please enter the three digit security code on the reverse side of the card';
+
+$lang['transaction_declined'] = 'Transaction Declined. Please check your card information and try again.';
+
+// admin
+
+$lang['direct'] = 'Direct';
+$lang['form'] = 'Form';
+$lang['server'] = 'Server';
+
+$lang['simulator'] = 'Simulator';
+$lang['test'] = 'Test';
+$lang['live'] = 'Live';
+
+$lang['payment'] = 'Payment';
+$lang['deferred'] = 'Deferred';
+$lang['authenticate'] = 'Authenticate';
+
+$lang['enter_vendor'] = 'You must enter a valid Vendor Name';
+$lang['vps_protocol'] = 'VPS protocol';
+$lang['vendor_name'] = 'Vendor Name';
+$lang['supported_cards'] = 'Supported Card Types';
+$lang['system'] = 'System';
+$lang['mode'] = 'Mode';
+$lang['type'] = 'Type';
+$lang['currency'] = 'Currency';
+
diff --git a/gocart/packages/payment/sage_pay/libraries/sage_pay.php b/gocart/packages/payment/sage_pay/libraries/sage_pay.php
new file mode 100644
index 00000000..35ff9a78
--- /dev/null
+++ b/gocart/packages/payment/sage_pay/libraries/sage_pay.php
@@ -0,0 +1,412 @@
+CI =& get_instance();
+ $this->CI->load->library('sage_pay_lib');
+ $this->CI->lang->load('sage_pay');
+
+ $this->method_name = lang('package_name');
+ }
+
+ /**
+ * customer front end checkout form
+ *
+ * @param array $post
+ * @return string
+*/
+ public function checkout_form($post = false){
+ //load form helper
+ $this->CI->load->helper('form');
+
+ $settings = $this->CI->Settings_model->get_settings('sage_pay');
+ $enabled = $settings['enabled'];
+
+ //explode selected card types
+ if(isset($settings['card_types'])){
+ $selected_cards = explode(',', $settings['card_types']);
+ $settings['card_types'] = array();
+ //store values in keys
+ foreach($selected_cards as $selected_card){
+ $settings['card_types'][$selected_card] = 1;
+ }
+ }
+
+ $form = array();
+
+ // Retrieve any previously stored card data to redisplay in case of errors
+ $sp_data = $this->CI->session->userdata('sp_data');
+
+
+ if($enabled)
+ {
+ $form['name'] = $this->method_name;
+
+ $form['form'] = $this->CI->load->view('customer_card', array('settings'=>$settings, 'sp_data'=>$sp_data), true);
+
+ return $form;
+
+ } else return array();
+
+ return $form;
+ }
+
+ public function checkout_check(){
+
+ //load credit card helper
+ $this->CI->load->helper('credit_card_helper');
+
+ $error_msg = lang('fix_errors')."
";
+ $error_list = "";
+
+ //Verify name field
+ if( empty($_POST["CardHolder"]))
+ $error_list .= "- ".lang('enter_name')."
";
+
+ //Verify date
+ if( !card_expiry_valid($_POST["ExpiryDate_mm"], $_POST["ExpiryDate_yy"]) )
+ $error_list .= "- ".lang('fix_exp_date')."
";
+
+ //Verify card number
+ if( empty($_POST["CardNumber"]) || !card_number_valid($_POST["CardNumber"]) )
+ $error_list .= "- ".lang('fix_card_num')."
";
+
+ //Verify security code
+ if( empty($_POST["CV2"]))
+ {
+ $error_list .= "- ".lang('enter_cvv')."
";
+ }
+
+ // We need to store the credit card information temporarily
+ $sp_tmp_data["sp_data"] = $_POST;
+ $this->CI->session->set_userdata($sp_tmp_data);
+
+ if( $error_list )
+ return $error_msg . $error_list . "
";
+ else
+ {
+ return false;
+ }
+ }
+
+ /**
+ * payment module description
+ *
+*/
+ public function description(){
+ //create a description from the session which we can store in the database
+ //this will be added to the database upon order confirmation
+
+/*
+ access the payment information with the $_POST variable since this is called
+ from the same place as the checkout_check above.
+*/
+
+ return 'Sage Pay';
+
+ }
+
+ /**
+ * back end installation functions
+ *
+*/
+ public function install(){
+ //default settings
+ $config['service'] = 'DIRECT'; //FORM, SERVER & DIRECT - direct only available in this version
+
+ $config['mode'] = 'Simulator'; //Simulator, Test & Live
+
+ $config['direct_simulator_url'] = 'https://test.sagepay.com/Simulator/VSPDirectGateway.asp';
+ $config['direct_test_url'] = 'https://test.sagepay.com/gateway/service/vspdirect-register.vsp';
+ $config['direct_live_url'] = 'https://live.sagepay.com/gateway/service/vspdirect-register.vsp';
+
+ $config['vps_protocol'] = 2.23;
+
+ $config['tx_type'] = 'PAYMENT'; //Can be PAYMENT, DEFERRED or AUTHENTICATE
+
+ $config['vendor'] = ''; //Sage pay vendor name
+
+ $config['account_type'] = 'E'; //E for e-commerce
+
+ $config['currency'] = 'USD'; //default USD
+
+ $config['enabled'] = '0';
+
+ $this->CI->Settings_model->save_settings('sage_pay', $config);
+
+ //create sql table(s)
+ $queries = $this->create_table($this->CI->db->dbprefix);
+ foreach($queries as $query){
+ $this->CI->db->query($query);
+ }
+
+ }
+
+ /**
+ * table for storing transaction data
+ *
+ * @param string $prefix
+ * @return array
+*/
+ private function create_table($prefix){
+ $query = array();
+
+ // currently disabled
+ //$query[] = "DROP TABLE IF EXISTS `".$prefix."sage_pay`;";
+
+ // currently set not to overwrite if install has already been run
+ $query[] = "CREATE TABLE IF NOT EXISTS `".$prefix."sage_pay` (
+ `id` int(11) NOT NULL AUTO_INCREMENT,
+ `order_id` int(11) DEFAULT NULL,
+ `VPSProtocol` varchar(4) COLLATE utf8_general_ci DEFAULT NULL,
+ `Status` varchar(15) COLLATE utf8_general_ci DEFAULT NULL,
+ `StatusDetail` varchar(255) COLLATE utf8_general_ci DEFAULT NULL,
+ `VendorTxCode` varchar(64) COLLATE utf8_general_ci DEFAULT NULL,
+ `VPSTxId` varchar(38) COLLATE utf8_general_ci DEFAULT NULL,
+ `SecurityKey` varchar(10) COLLATE utf8_general_ci DEFAULT NULL,
+ `TxAuthNo` int(11) DEFAULT NULL,
+ `AVSCV2` varchar(50) COLLATE utf8_general_ci DEFAULT NULL,
+ `AddressResult` varchar(20) COLLATE utf8_general_ci DEFAULT NULL,
+ `PostCodeResult` varchar(20) COLLATE utf8_general_ci DEFAULT NULL,
+ `CV2Result` varchar(20) COLLATE utf8_general_ci DEFAULT NULL,
+ `3DSecureStatus` varchar(20) COLLATE utf8_general_ci DEFAULT NULL,
+ `CAVV` varchar(32) COLLATE utf8_general_ci DEFAULT NULL,
+ `MD` varchar(35) COLLATE utf8_general_ci DEFAULT NULL,
+ `ACSURL` text COLLATE utf8_general_ci,
+ `PAReq` text COLLATE utf8_general_ci,
+ `PayPalRedirectURL` varchar(255) COLLATE utf8_general_ci DEFAULT NULL,
+ `Created` datetime default NULL,
+ PRIMARY KEY (`id`)
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci AUTO_INCREMENT=1;";
+
+ return $query;
+ }
+ /**
+ * remove payment module settings
+ *
+ */
+ public function uninstall(){
+ $this->CI->Settings_model->delete_settings('sage_pay');
+ $queries = $this->drop_table($this->CI->db->dbprefix);
+ foreach($queries as $query){
+ $this->CI->db->query($query);
+ }
+ }
+ /**
+ * drop any associated tables
+ *
+ * @param string $prefix
+ * @return array
+ */
+ private function drop_table($prefix){
+ $query = array();
+
+ $query[] = "DROP TABLE IF EXISTS `".$prefix."sage_pay`;";
+
+ return $query;
+ }
+
+
+ /**
+ * payment processor
+ *
+ */
+ public function process_payment(){
+
+ // Get previously entered customer info
+ $sp_data = $this->CI->session->userdata('sp_data');
+ $customer = $this->CI->go_cart->customer();
+
+ // Set our sagepay fields
+
+ $this->CI->sage_pay_lib->add_field('Amount', $this->CI->go_cart->total());
+
+ $this->CI->sage_pay_lib->add_field('CardHolder', $sp_data["CardHolder"]);
+ $this->CI->sage_pay_lib->add_field('CardNumber', $sp_data["CardNumber"]);
+ $this->CI->sage_pay_lib->add_field('StartDate', $sp_data["StartDate_mm"] . $sp_data["StartDate_yy"]);
+ $this->CI->sage_pay_lib->add_field('ExpiryDate', $sp_data["ExpiryDate_mm"] . $sp_data["ExpiryDate_yy"]);
+ $this->CI->sage_pay_lib->add_field('CV2', $sp_data["CV2"]);
+ $this->CI->sage_pay_lib->add_field('CardType', $sp_data["CardType"]);
+
+ $this->CI->sage_pay_lib->add_field('BillingSurname', $customer['bill_address']["lastname"]);
+ $this->CI->sage_pay_lib->add_field('BillingFirstnames', $customer['bill_address']["firstname"]);
+ $this->CI->sage_pay_lib->add_field('BillingAddress1', $customer['bill_address']["address1"]);
+ $this->CI->sage_pay_lib->add_field('BillingAddress2',$customer['bill_address']["address2"]);
+ $this->CI->sage_pay_lib->add_field('BillingCity', $customer['bill_address']["city"]);
+ // State is only supported in US, for all other countries leave blank
+ if($customer['bill_address']["country_id"] == "223")
+ {
+ $this->CI->sage_pay_lib->add_field('BillingState', $customer['bill_address']["zone"]);
+ }
+ else
+ {
+ $this->CI->sage_pay_lib->add_field('BillingState', "");
+ }
+
+ $this->CI->sage_pay_lib->add_field('BillingPostCode', $customer['bill_address']["zip"]);
+ $this->CI->sage_pay_lib->add_field('BillingCountry', $customer['bill_address']["country_code"]);
+ $this->CI->sage_pay_lib->add_field('BillingPhone', $customer['bill_address']["phone"]);
+
+ $this->CI->sage_pay_lib->add_field('DeliverySurname', $customer['ship_address']["lastname"]);
+ $this->CI->sage_pay_lib->add_field('DeliveryFirstnames', $customer['ship_address']["firstname"]);
+ $this->CI->sage_pay_lib->add_field('DeliveryAddress1', $customer['ship_address']["address1"]);
+ $this->CI->sage_pay_lib->add_field('DeliveryAddress2',$customer['ship_address']["address2"]);
+ $this->CI->sage_pay_lib->add_field('DeliveryCity', $customer['ship_address']["city"]);
+ // State is only supported in US, for all other countries leave blank
+ if($customer['ship_address']["country_id"] == "223")
+ {
+ $this->CI->sage_pay_lib->add_field('DeliveryState', $customer['ship_address']["zone"]);
+ }
+ else
+ {
+ $this->CI->sage_pay_lib->add_field('DeliveryState', "");
+ }
+
+ $this->CI->sage_pay_lib->add_field('DeliveryPostCode', $customer['ship_address']["zip"]);
+ $this->CI->sage_pay_lib->add_field('DeliveryCountry', $customer['ship_address']["country_code"]);
+ $this->CI->sage_pay_lib->add_field('DeliveryPhone', $customer['ship_address']["phone"]);
+
+
+ // Send info to sagepay and receive a response
+ $this->CI->sage_pay_lib->process_payment();
+ $this->_sagepay_response = $this->CI->sage_pay_lib->get_all_responses();
+
+ // handle response status
+ switch($this->_sagepay_response['Status']){
+ case 'OK':
+ case 'REGISTERED':
+ $this->CI->session->unset_userdata('sp_data');
+ return false; // false == no error
+ break;
+
+ case 'MALFORMED':
+ case 'INVALID':
+ case 'ERROR':
+ case 'NOTAUTHED':
+ case 'REJECTED':
+ case '3DAUTH':
+ log_message('debug', 'Sage-pay module - Protocol:'. $this->_sagepay_response['VPSProtocol'] .' - Status:' . $this->_sagepay_response['Status']);
+ log_message('debug', 'Sage-pay module - Status Detail:'. $this->_sagepay_response['StatusDetail']);
+ return lang('transaction_declined');
+ break;
+ }
+ }
+ /**
+ * final method to run after the order has been saved.
+ * allows you to save order_id etc. back to the payment module
+ *
+ * @param array $data
+ */
+ public function complete_payment($data){
+
+ // add order id for admin to process payments
+ $this->_sagepay_response['order_id'] = $data['order_id'];
+
+ // record results in say_pay table for future processing
+ $this->CI->db->insert($this->CI->db->dbprefix . 'sage_pay', $this->_sagepay_response);
+ }
+
+ /**
+ * Admin form settings
+ *
+ * @param array $post
+ * @return string
+ */
+ public function form($post = false){
+
+ //load form helper
+ $this->CI->load->helper('form');
+
+ //this same function processes the form
+ if(!$post)
+ {
+ $settings = $this->CI->Settings_model->get_settings('sage_pay');
+
+ //explode selected card types
+ if(isset($settings['card_types'])){
+ $selected_cards = explode(',', $settings['card_types']);
+ $settings['card_types'] = array();
+ //store values in keys
+ foreach($selected_cards as $selected_card){
+ $settings['card_types'][$selected_card] = 1;
+ }
+ }
+
+
+
+ }
+ else
+ {
+ $settings = $post;
+ }
+
+ return $this->CI->load->view('sage_pay_form', array('settings'=>$settings), true);
+ }
+
+ /**
+ * Admin form validation
+ *
+ */
+ public function check(){
+ $error = false;
+
+ // TODO 4 -o swicks -c Category: fix check options
+
+ if(empty($_POST['vendor']))
+ $error = "".lang('enter_vendor')."
";
+
+ if($error)
+ {
+ return $error;
+ }
+ else
+ {
+ //we save the settings if it gets here
+
+ //place selected card types in a string
+ $_POST['card_types'] = isset($_POST['card_types'])? implode(',', $_POST['card_types']) : "";
+
+ $this->CI->Settings_model->save_settings('sage_pay', $_POST);
+
+ return false;
+ }
+ }
+}
diff --git a/gocart/packages/payment/sage_pay/libraries/sage_pay_lib.php b/gocart/packages/payment/sage_pay/libraries/sage_pay_lib.php
new file mode 100644
index 00000000..828edf99
--- /dev/null
+++ b/gocart/packages/payment/sage_pay/libraries/sage_pay_lib.php
@@ -0,0 +1,145 @@
+CI =& get_instance();
+
+ // Retrieve gocart admin settings
+ if( $this->settings = $this->CI->Settings_model->get_settings('sage_pay') )
+ {
+ // If we have settings, the module is installed. If not, don't bother loading them
+ switch($this->settings['mode']){
+ case 'test':
+ $this->gateway_url = $this->settings['direct_test_url'];
+ break;
+ case 'live':
+ $this->gateway_url = $this->settings['direct_live_url'];
+ break;
+ case 'simulator':
+ default:
+ $this->gateway_url = $this->settings['direct_simulator_url'];
+ break;
+ }
+
+ }
+ }
+
+ /**
+ * Add field to instance array
+ *
+ * @param string $field
+ * @param string $value
+ */
+ function add_field($field, $value) {
+ $this->fields[$field] = $value;
+ }
+
+
+ /**
+ * process say pay payments
+ *
+ * @return string status
+ */
+ public function process_payment(){
+ set_time_limit(60);
+
+ // add some preset items
+ $this->add_field('VPSProtocol', $this->settings['vps_protocol']);
+ $this->add_field('Vendor', $this->settings['vendor']);
+
+ // need to improve description - site description or part of cart
+ $this->add_field('Description', $this->settings['vendor']);
+
+ $this->add_field('Currency', $this->settings['currency']);
+ $this->add_field('TxType', $this->settings['tx_type']);
+
+ //generate a unique vendorTxCode
+ $time_stamp = date("ymdHis");
+ $rand_num = rand(0,32000)*rand(0,32000);
+ $this->vendor_tx_code= $this->settings['vendor'] . "-" . $time_stamp . "-" . $rand_num;
+ $this->add_field('VendorTxCode', $this->vendor_tx_code);
+
+ foreach( $this->fields as $key => $value ) {
+ $this->field_string .= "$key=" . urlencode( $value ) . "&";
+ }
+ $this->field_string = rtrim( $this->field_string, "& " );
+
+ //set up URL & options
+ $curl = curl_init($this->gateway_url);
+ curl_setopt($curl, CURLOPT_HEADER, 0);
+ curl_setopt($curl, CURLOPT_POST, 1);
+ curl_setopt($curl, CURLOPT_POSTFIELDS, $this->field_string);
+ curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($curl, CURLOPT_TIMEOUT,30);
+ //remove these last 2 lines if using an earlier version of CURL
+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
+ curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 1);
+
+ // execute curl
+ $this->response_string = curl_exec($curl);
+ $this->response = array();
+ // split response into lines
+ $lines = preg_split( '/\r\n|\r|\n/', $this->response_string );
+ foreach($lines as $line){
+ $key_value = preg_split( '/=/', $line );
+ if(count($key_value) == 2)
+ $this->response[trim($key_value[0])] = trim($key_value[1]);
+ }
+
+ // additional information returned for debugging
+ $this->response['VendorTxCode'] = $this->vendor_tx_code;
+
+ $this->response['Created'] = date('Y-m-d H:i:s');
+
+ return $this->response['Status'];
+ }
+
+ /**
+ * response status detail
+ *
+ */
+ function get_response_status_text() {
+ return $this->response['StatusDetail'];
+ }
+
+ /**
+ * returns array of all response results from sagepay
+ *
+ */
+ function get_all_responses() {
+ return $this->response;
+ }
+
+
+
+
+}
\ No newline at end of file
diff --git a/gocart/packages/payment/sage_pay/views/customer_card.php b/gocart/packages/payment/sage_pay/views/customer_card.php
new file mode 100644
index 00000000..c37197b2
--- /dev/null
+++ b/gocart/packages/payment/sage_pay/views/customer_card.php
@@ -0,0 +1,102 @@
+
+
+
+
+'01','02'=>'02','03'=>'03','04'=>'04','05'=>'05','06'=>'06','07'=>'07','08'=>'08','09'=>'09','10'=>'10','11'=>'11','12'=>'12');
+
+ // valid from years
+ $year_now = date('y');
+ $valid_from_years = array();
+ for($y = $year_now; $y > $year_now - 5; $y--)
+ $valid_from_years[$y] = $y;
+ // expires on years
+ $expires_on_years = array();
+ for($y = $year_now; $y < $year_now + 7; $y++)
+ $expires_on_years[$y] = $y;
+
+
+?>
+
+
+
+
+
\ No newline at end of file
diff --git a/gocart/packages/payment/sage_pay/views/sage_pay_form.php b/gocart/packages/payment/sage_pay/views/sage_pay_form.php
new file mode 100644
index 00000000..94b683dc
--- /dev/null
+++ b/gocart/packages/payment/sage_pay/views/sage_pay_form.php
@@ -0,0 +1,71 @@
+
+
+ lang('disabled'), 1 => lang('enabled'));
+
+ //protocol (save hidden to keep in settings)
+ echo form_hidden('vps_protocol', $settings['vps_protocol']);
+
+ //system
+ //$service_options = array('direct' => lang('direct'), 'form' => lang('form'), 'server' => lang('server'));
+ // currently only direct - form and server to follow...
+ $service_options = array('direct' => lang('direct'));
+ //mode
+ $mode_options = array('simulator' => lang('simulator'), 'test' => lang('test'), 'live' => lang('live'));
+ //type
+ $type_options = array('PAYMENT' => lang('payment'), 'DEFFERRED' => lang('deferred'), 'AUTHENTICATE' => lang('authenticate'));
+ //available card types
+ $available_card_types = explode(',', SAGE_PAY_CARD_TYPES);
+ for ($i=0; $i < count($available_card_types); $i+=2)
+ $acts[$available_card_types[$i]]=$available_card_types[$i+1];
+ //currency
+ $available_currency_types = explode(',', SAGE_PAY_CURRENCY);
+ for ($i=0; $i < count($available_currency_types); $i+=2)
+ $currency_options[$available_currency_types[$i]]=$available_currency_types[$i+1];
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $value):?>
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/gocart/packages/shipping/fedex/language/english/fedex_lang.php b/gocart/packages/shipping/fedex/language/english/fedex_lang.php
new file mode 100644
index 00000000..51d69f2a
--- /dev/null
+++ b/gocart/packages/shipping/fedex/language/english/fedex_lang.php
@@ -0,0 +1,47 @@
+CI =& get_instance();
- $this->CI->load->model('Settings_model');
-
+ $this->CI->lang->load('fedex');
+
//$this->server = 'https://gatewaybeta.fedex.com/GatewayDC';
-
+
//The WSDL is not included with the sample code.
//Please include and reference in $path_to_wsdl variable.
- $this->path_to_wsdl = APPPATH."libraries/shipping/fedex/lib/RateService_v8.wsdl";
-
+ $this->path_to_wsdl = APPPATH."packages/shipping/fedex/libraries/RateService_v8.wsdl";
+
// Packaging types
- $this->package_types['FEDEX_10KG_BOX'] = '10KG Box';
- $this->package_types['FEDEX_25KG_BOX'] = '25KG Box';
- $this->package_types['FEDEX_BOX'] = 'Fedex Box';
- $this->package_types['FEDEX_ENVELOPE'] = 'Fedex Envelope';
- $this->package_types['FEDEX_PAK'] = 'Fedex Pak';
- $this->package_types['FEDEX_TUBE'] = 'Fedex Tube';
- $this->package_types['YOUR_PACKAGING'] = 'Your Packaging';
-
-
+ $this->package_types['FEDEX_10KG_BOX'] = lang('FEDEX_10KG_BOX');
+ $this->package_types['FEDEX_25KG_BOX'] = lang('FEDEX_25KG_BOX');
+ $this->package_types['FEDEX_BOX'] = lang('FEDEX_BOX');
+ $this->package_types['FEDEX_ENVELOPE'] = lang('FEDEX_ENVELOPE');
+ $this->package_types['FEDEX_PAK'] = lang('FEDEX_PAK');
+ $this->package_types['FEDEX_TUBE'] = lang('FEDEX_TUBE');
+ $this->package_types['YOUR_PACKAGING'] = lang('YOUR_PACKAGING');
+
+
// Available Services
- $this->service_list['EUROPE_FIRST_INTERNATIONAL_PRIORITY'] = 'Fedex Europe 1st Intn\'l Priority';
- $this->service_list['FEDEX_1_DAY_FREIGHT'] = 'Fedex 1 Day Freight';
- $this->service_list['FEDEX_2_DAY'] = 'Fedex 2 Day';
- $this->service_list['FEDEX_2_DAY_FREIGHT'] = 'Fedex 2 Day Freight';
- $this->service_list['FEDEX_3_DAY_FREIGHT'] = 'Fedex 3 Day Freight';
- $this->service_list['FEDEX_EXPRESS_SAVER'] = 'Fedex Express Saver';
- $this->service_list['FEDEX_GROUND'] = 'Fedex Ground';
- $this->service_list['FIRST_OVERNIGHT'] = 'Fedex First Overnight';
- $this->service_list['GROUND_HOME_DELIVERY'] = 'Fedex Ground Home Delivery';
- $this->service_list['INTERNATIONAL_ECONOMY'] = 'Fedex International Economy';
- $this->service_list['INTERNATIONAL_ECONOMY_FREIGHT'] = 'Fedex International Economy Freight';
- $this->service_list['INTERNATIONAL_FIRST'] = 'Fedex International First';
- $this->service_list['INTERNATIONAL_PRIORITY'] = 'Fedex International Priority';
- $this->service_list['INTERNATIONAL_PRIORITY_FREIGHT'] = 'Fedex International Priority Freight';
- $this->service_list['PRIORITY_OVERNIGHT'] = 'Fedex Priority Overnight';
- $this->service_list['SMART_POST'] = 'Fedex Smart Post';
- $this->service_list['STANDARD_OVERNIGHT'] = 'Fedex Standard Overnight';
- $this->service_list['FEDEX_FREIGHT'] = 'Fedex Freight';
- $this->service_list['FEDEX_NATIONAL_FREIGHT'] = 'Fedex National Freight';
- $this->service_list['INTERNATIONAL_GROUND'] = 'Fedex International Ground';
-
+ $this->service_list['EUROPE_FIRST_INTERNATIONAL_PRIORITY'] = lang('EUROPE_FIRST_INTERNATIONAL_PRIORITY');
+ $this->service_list['FEDEX_1_DAY_FREIGHT'] = lang('FEDEX_1_DAY_FREIGHT');
+ $this->service_list['FEDEX_2_DAY'] = lang('FEDEX_2_DAY');
+ $this->service_list['FEDEX_2_DAY_FREIGHT'] = lang('FEDEX_2_DAY_FREIGHT');
+ $this->service_list['FEDEX_3_DAY_FREIGHT'] = lang('FEDEX_3_DAY_FREIGHT');
+ $this->service_list['FEDEX_EXPRESS_SAVER'] = lang('FEDEX_EXPRESS_SAVER');
+ $this->service_list['FEDEX_GROUND'] = lang('FEDEX_GROUND');
+ $this->service_list['FIRST_OVERNIGHT'] = lang('FIRST_OVERNIGHT');
+ $this->service_list['GROUND_HOME_DELIVERY'] = lang('GROUND_HOME_DELIVERY');
+ $this->service_list['INTERNATIONAL_ECONOMY'] = lang('INTERNATIONAL_ECONOMY');
+ $this->service_list['INTERNATIONAL_ECONOMY_FREIGHT'] = lang('INTERNATIONAL_ECONOMY_FREIGHT');
+ $this->service_list['INTERNATIONAL_FIRST'] = lang('INTERNATIONAL_FIRST');
+ $this->service_list['INTERNATIONAL_PRIORITY'] = lang('INTERNATIONAL_PRIORITY');
+ $this->service_list['INTERNATIONAL_PRIORITY_FREIGHT'] = lang('INTERNATIONAL_PRIORITY_FREIGHT');
+ $this->service_list['PRIORITY_OVERNIGHT'] = lang('PRIORITY_OVERNIGHT');
+ $this->service_list['SMART_POST'] = lang('SMART_POST');
+ $this->service_list['STANDARD_OVERNIGHT'] = lang('STANDARD_OVERNIGHT');
+ $this->service_list['FEDEX_FREIGHT'] = lang('FEDEX_FREIGHT');
+ $this->service_list['FEDEX_NATIONAL_FREIGHT'] = lang('FEDEX_NATIONAL_FREIGHT');
+ $this->service_list['INTERNATIONAL_GROUND'] = lang('INTERNATIONAL_GROUND');
+
}
-
+
function rates()
{
-
+
$this->CI->load->library('session');
-
+
// get customer info
$customer = $this->CI->go_cart->customer();
-
+
$customer_address = $customer['ship_address'];
-
-
+
+
// Weight of order
$weight = $this->CI->go_cart->order_weight();
// retrieve settings
$settings = $this->CI->Settings_model->get_settings('fedex');
-
+
//check if we're enabled
if(!$settings['enabled'] || $settings['enabled'] < 1)
{
return array();
}
-
+
$key = $settings['key'];
$password = $settings['password'];
$shipAccount = $settings['shipaccount'];
@@ -91,72 +91,73 @@ function rates()
$pkg_height = $settings['height'];
$pkg_length = $settings['length'];
$billAccount = $shipAccount;
-
-
-
+
+
+
//====== Fedex code start
-
- require_once('lib/fedex-common.php5');
-
+
+ require_once('fedex-common.php');
+
ini_set("soap.wsdl_cache_enabled", "0");
-
+
$client = new SoapClient($this->path_to_wsdl, array('trace' => 1)); // Refer to http://us3.php.net/manual/en/ref.soap.php for more information
-
+
$request['WebAuthenticationDetail'] = array('UserCredential' =>
- array('Key' => $key, 'Password' => $password));
+ array('Key' => $key, 'Password' => $password));
$request['ClientDetail'] = array('AccountNumber' => $shipAccount, 'MeterNumber' => $meter);
$request['TransactionDetail'] = array('CustomerTransactionId' => ' *** Rate Available Services Request v8 using PHP ***');
$request['Version'] = array('ServiceId' => 'crs', 'Major' => '8', 'Intermediate' => '0', 'Minor' => '0');
$request['ReturnTransitAndCommit'] = true;
$request['RequestedShipment']['DropoffType'] = 'REGULAR_PICKUP'; // valid values REGULAR_PICKUP, REQUEST_COURIER, ...
$request['RequestedShipment']['ShipTimestamp'] = date('c');
-
+
$request['RequestedShipment']['Shipper'] = array('Address' => array(
- 'StreetLines' => array($this->CI->config->item('address1'), $this->CI->config->item('address2')), // Origin details
- 'City' => $this->CI->config->item('city'),
- 'StateOrProvinceCode' => $this->CI->config->item('state'),
- 'PostalCode' => $this->CI->config->item('zip'),
- 'CountryCode' => $this->CI->config->item('country')));
+ 'StreetLines' => array($this->CI->config->item('address1'), $this->CI->config->item('address2')), // Origin details
+ 'City' => $this->CI->config->item('city'),
+ 'StateOrProvinceCode' => $this->CI->config->item('state'),
+ 'PostalCode' => $this->CI->config->item('zip'),
+ 'CountryCode' => $this->CI->config->item('country')));
$request['RequestedShipment']['Recipient'] = array('Address' => array (
- 'StreetLines' => array($customer_address['address1'],$customer_address['address2']), // Destination details
- 'City' => $customer_address['city'],
- 'StateOrProvinceCode' => $customer_address['zone'],
- 'PostalCode' => $customer_address['zip'],
- 'CountryCode' => $customer_address['country_code']));
+ 'StreetLines' => array($customer_address['address1'],$customer_address['address2']), // Destination details
+ 'City' => $customer_address['city'],
+ 'StateOrProvinceCode' => $customer_address['state'],
+ 'PostalCode' => $customer_address['zip'],
+ 'CountryCode' => $customer_address['country_code'],
+ 'Residential'=> true));
$request['RequestedShipment']['ShippingChargesPayment'] = array('PaymentType' => 'SENDER',
- 'Payor' => array('AccountNumber' => $billAccount,
- 'CountryCode' => $customer_address['country_code']));
+ 'Payor' => array('AccountNumber' => $billAccount,
+ 'CountryCode' => $customer_address['country_code']));
$request['RequestedShipment']['RateRequestTypes'] = 'ACCOUNT';
$request['RequestedShipment']['RateRequestTypes'] = 'LIST';
$request['RequestedShipment']['PackageCount'] = '1';
$request['RequestedShipment']['PackageDetail'] = 'INDIVIDUAL_PACKAGES';
$request['RequestedShipment']['PackagingType'] = $package;
$request['RequestedShipment']['RequestedPackageLineItems'] = array('0' => array('Weight' => array('Value' => $weight,
- 'Units' => 'LB'),
- 'Dimensions' => array('Length' => $pkg_length,
- 'Width' => $pkg_width,
- 'Height' => $pkg_height,
- 'Units' => 'IN')));
-
+ 'Units' => $this->config->item('weight_unit')),
+ 'Dimensions' => array('Length' => $pkg_length,
+ 'Width' => $pkg_width,
+ 'Height' => $pkg_height,
+ 'Units' => $this->config->item('dimension_unit'))));
+
// send request
$response = $client ->getRates($request);
-
+
if ($response->HighestSeverity != 'FAILURE' && $response->HighestSeverity != 'ERROR' )
{
-
+
if(!isset($response->RateReplyDetails) || ! is_array($response->RateReplyDetails))
{
return array(); // No Results
}
-
+
foreach ($response->RateReplyDetails as $rateReply)
{
if(in_array($rateReply->ServiceType, $service))
{
-
+
$amount = $rateReply->RatedShipmentDetails[0]->ShipmentRateDetail->TotalNetCharge->Amount;
-
+
if(is_numeric($handling_amount)) // valid entry?
{
if($handling_method=='$')
@@ -168,24 +169,24 @@ function rates()
$amount += $amount * ($handling_amount/100);
}
}
-
+
$rates[$this->service_list[$rateReply->ServiceType]] = number_format($amount,2,".",",");
}
}
-
+
return $rates;
}
else
{
return array(); // fail
}
-
-
- //======== Fedex Code End
-
-
+
+
+ //======== Fedex Code End
+
+
}
-
+
function install()
{
$default_settings = array(
@@ -201,20 +202,20 @@ function install()
'height' => 3,
'package'=>'YOUR_PACKAGING',
'service' => implode(',', array_keys($this->service_list))
- );
+ );
//set a default blank setting for flatrate shipping
$this->CI->Settings_model->save_settings('fedex', $default_settings);
}
-
+
function uninstall()
{
$this->CI->Settings_model->delete_settings('fedex');
}
-
+
function form($post = false)
{
$this->CI->load->helper('form');
-
+
//this same function processes the form
if(!$post)
{
@@ -248,78 +249,77 @@ function form($post = false)
$enabled = $post['enabled'];
}
-
- $form = 'Key: | '.form_input('key', $key, 'class="gc_tf1"') .' |
- Ship Account: | '.form_input('shipaccount', $shipaccount, 'class="gc_tf1"') .' |
- Meter: | '.form_input('meter', $meter, 'class="gc_tf1"') .' |
- Password: | '.form_input('password', $password, 'class="gc_tf1"') .' |
';
-
- $form .= 'Services To Offer: | ';
-
- foreach($this->service_list as $id=>$opt)
- {
- $form .= "package_types;
-
- $form .= form_dropdown('package', $opts, $package);
-
- $form .= ' |
Container Dimensions (inches): | ';
-
- $form .= '
Height: | ';
-
- $form .= ' '. form_input('height', $height, 'class="gc_tf1"');
-
- $form .= ' |
Width: | ';
-
- $form .= ' '. form_input('width', $width, 'class="gc_tf1"');
-
- $form .= ' |
Length: | ';
-
- $form .= ' '. form_input('length', $length, 'class="gc_tf1"');
-
- $form .= ' |
Handling Fee: | ';
-
- $form .= form_dropdown('handling_method', array('$'=>'$', '%'=>'%'), $handling_method);
-
- $form .= ' '. form_input('handling_amount', $handling_amount, 'class="gc_tf1"');
-
- $form .= ' |
Module Status: | ';
-
- $opts = array('Disabled', 'Enabled');
-
- $form .= form_dropdown('enabled', $opts, $enabled);
-
- $form .= ' |
';
-
- return $form;
+
+ ob_start();
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ service_list as $id=>$opt):?>
+
+
+
+
+ package_types, $package, 'class="span3"');?>
+
+ (CI->config->item('dimension_unit');?>)
+
+
+
+
+
+
+
+
+
+
+ '$', '%'=>'%'), $handling_method, 'class="span3"');?>
+
+
+
+
+ CI->Settings_model->save_settings('fedex', $save);
-
- return false;
- }
+ else
+ {
+
+ $save = $_POST;
+ $save['service'] = implode(',', $save['service']);
+
+ //we save the settings if it gets here
+ $this->CI->Settings_model->save_settings('fedex', $save);
+
+ return false;
}
}
+}
diff --git a/gocart/packages/shipping/flatrate/language/english/flatrate_lang.php b/gocart/packages/shipping/flatrate/language/english/flatrate_lang.php
new file mode 100644
index 00000000..ba71bc18
--- /dev/null
+++ b/gocart/packages/shipping/flatrate/language/english/flatrate_lang.php
@@ -0,0 +1,4 @@
+CI =& get_instance();
- $this->CI->load->model('Settings_model');
+ $this->CI->lang->load('flatrate');
}
function rates()
@@ -42,35 +42,32 @@ function uninstall()
function form($post = false)
{
+ $this->CI->load->helper('form');
+
//this same function processes the form
if(!$post)
{
$settings = $this->CI->Settings_model->get_settings('flatrate');
$rate = $settings['rate'];
- $enabled = $settings['enabled'];
}
else
{
$rate = $post['rate'];
- $enabled = $post['enabled'];
}
+ ob_start();
+ ?>
+
+ 'rate', 'value'=>$rate, 'class'=>'span3'));?>
- $form = '';
+
+
+ The rate must be a numerical value.';
+ $error .= ''.lang('val_err').'
';
}
//count the errors
diff --git a/gocart/packages/shipping/table_rate/language/english/table_rate_lang.php b/gocart/packages/shipping/table_rate/language/english/table_rate_lang.php
new file mode 100644
index 00000000..0f9fe657
--- /dev/null
+++ b/gocart/packages/shipping/table_rate/language/english/table_rate_lang.php
@@ -0,0 +1,41 @@
+Note: Fields that are left blank or contain non-numeric will be removed.';
+
+$lang['add_tbl'] = 'Add New Table';
+
+$lang['btn_tbl_remove'] = 'Remove Table';
+$lang['btn_rename'] = 'Rename Table';
+$lang['btn_remove'] = 'Remove';
+$lang['btn_above'] = 'Add Above';
+$lang['btn_below'] = 'Add Below';
+
+$lang['by_country'] = 'By Country';
+
+$lang['rates'] = 'Rates';
+$lang['rate'] = 'Rate';
+$lang['from'] = 'From';
+
+$lang['na'] = 'N/A';
+
+$lang['tbl_err'] = 'You must leave at least one table.';
+
+$lang['method'] = 'Method';
+
+
+// form check
+$lang['empty_post'] = 'Nothing was sent.';
+$lang['post_err'] = 'You must enter at least 1 rate per table in order to proceed.';
\ No newline at end of file
diff --git a/gocart/packages/shipping/table_rate/libraries/table_rate.php b/gocart/packages/shipping/table_rate/libraries/table_rate.php
new file mode 100644
index 00000000..5b8de55d
--- /dev/null
+++ b/gocart/packages/shipping/table_rate/libraries/table_rate.php
@@ -0,0 +1,214 @@
+CI =& get_instance();
+ $this->CI->lang->load('table_rate');
+ }
+
+ function rates()
+ {
+ //$method either equals weight or price
+ //this can be set either from some sort of admin panel, or directly here.
+ $this->CI->load->library('session');
+
+ // get customer info
+ $customer = $this->CI->go_cart->customer();
+
+ //if there is no address set then return blank
+ if(empty($customer['ship_address']))
+ {
+ return array();
+ }
+
+ $settings = $this->CI->Settings_model->get_settings('table_rate');
+
+ if(!(bool)$settings['enabled'])
+ {
+ return array();
+ }
+
+ $rates = unserialize($settings['rates']);
+
+ $order_weight = $this->get_order_weight();
+ $order_price = $this->get_order_price();
+
+ $countries = $this->CI->Location_model->get_countries();
+
+ $return = array();
+ foreach($rates as $rate)
+ {
+ if((bool)$rate['country'] && ($rate['country'] != $customer['ship_address']['country_id']))
+ {
+ // if the customer is not in the country specified by this table, then skip it
+ continue;
+ }
+
+ //sort rates highest "From" to lowest
+ krsort($rate['rates'], SORT_NUMERIC);
+
+ if ($rate['method'] == 'weight')
+ {
+ foreach ($rate['rates'] as $key => $val)
+ {
+ if($key <= $order_weight)
+ {
+ $return[$rate['name']] = $val;
+ break;
+ }
+ }
+ }
+ elseif ($rate['method'] == 'price')
+ {
+ foreach ($rate['rates'] as $key => $val)
+ {
+ if($key <= $order_price)
+ {
+ $return[$rate['name']] = $val;
+ break;
+ }
+ }
+ }
+ }
+
+ return $return;
+ }
+
+ function install()
+ {
+
+ $install = array();
+ $install['enabled'] = false;
+
+ $rate = array();
+ $rate[0] = array();
+ $rate[0]['name'] = 'Example';
+ $rate[0]['method'] = 'price';
+ $rate[0]['country'] = 0;
+
+ // install some example data
+ $rate[0]['rates'] = array(
+ '80' => '85.00'
+ ,'70' => '65.00'
+ ,'60' => '55.00'
+ ,'50' => '55.00'
+ ,'40' => '45.00'
+ ,'30' => '35.00'
+ ,'20' => '25.00'
+ ,'10' => '15.00'
+ ,'0' => '5.00');
+
+ $install['rates'] = serialize($rate);
+
+ $this->CI->Settings_model->save_settings('table_rate', $install);
+ }
+
+ function uninstall()
+ {
+ $this->CI->Settings_model->delete_settings('table_rate');
+ }
+
+ function form($_POST = false)
+ {
+ $this->CI->load->helper('form');
+ //this same function processes the form
+ if(!$_POST)
+ {
+ $settings = $this->CI->Settings_model->get_settings('table_rate');
+ $settings['rates'] = unserialize($settings['rates']);
+ }
+ else
+ {
+ $settings['enabled'] = $_POST['enabled'];
+ $settings['rates'] = $_POST['rates'];
+ }
+
+ $countries = $this->CI->Location_model->get_countries_menu();
+
+ $data = $settings;
+ $data['countries'] = array(0=>lang('all_countries')) + $countries;
+
+ return $this->CI->load->view('table_rate_form', $data, true);
+
+ }
+
+ function check()
+ {
+ if(empty($_POST))
+ {
+ return ''.lang('empty_post').'
';
+ }
+
+ $save['enabled'] = $_POST['enabled'];
+
+ $rates = array();
+ foreach($_POST['rate'] as $rate)
+ {
+ if(isset($rate['rates']))
+ {
+ $rate['rates'] = $this->organize_rates($rate['rates']);
+ }
+ else
+ {
+ $rate['rates'] = array();
+ }
+
+ $rates[] = $rate;
+ }
+ $save['rates'] = serialize($rates);
+
+ //we save the settings if it gets here
+ $this->CI->Settings_model->save_settings('table_rate', $save);
+
+ return false;
+
+ }
+
+ function organize_rates($rates)
+ {
+ $new_rates = array();
+ foreach($rates as $r)
+ {
+ if(is_numeric($r['from']) && is_numeric($r['rate']))
+ {
+ $new_rates[$r['from']] = $r['rate'];
+ }
+ ksort($new_rates, SORT_NUMERIC);
+ }
+ return $new_rates;
+ }
+
+
+ function organize_post_rates($_POST)
+ {
+ $rates = array();
+
+ foreach($_POST['from'] as $table=>$list)
+ {
+ foreach($list as $key=>$value)
+ {
+ $rates[$table][$value] = $_POST['rate'][$table][$key];
+ }
+ // sort the list
+ krsort($rates[$table]);
+ }
+
+
+ return $rates;
+ }
+
+ function get_order_weight()
+ {
+ return $this->CI->go_cart->order_weight();
+ }
+
+ function get_order_price()
+ {
+ return $this->CI->go_cart->subtotal();
+ }
+}
\ No newline at end of file
diff --git a/gocart/packages/shipping/table_rate/views/table_rate_form.php b/gocart/packages/shipping/table_rate/views/table_rate_form.php
new file mode 100644
index 00000000..0bdfc49b
--- /dev/null
+++ b/gocart/packages/shipping/table_rate/views/table_rate_form.php
@@ -0,0 +1,169 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/gocart/packages/shipping/tablerate/language/english/tablerate_lang.php b/gocart/packages/shipping/tablerate/language/english/tablerate_lang.php
new file mode 100644
index 00000000..27fb3e07
--- /dev/null
+++ b/gocart/packages/shipping/tablerate/language/english/tablerate_lang.php
@@ -0,0 +1,31 @@
+Note: Fields that are left blank or contain non-numeric will be removed.';
+
+$lang['add_tbl'] = 'Add New Table';
+
+$lang['btn_tbl_remove'] = 'Remove Table';
+$lang['btn_rename'] = 'Rename Table';
+$lang['btn_remove'] = 'Remove';
+$lang['btn_above'] = 'Add Above';
+$lang['btn_below'] = 'Add Below';
+
+$lang['by_country'] = 'By Country';
+$lang['weight'] = 'Weight';
+$lang['price'] = 'Price';
+$lang['rates'] = 'Rates';
+$lang['rate'] = 'Rate';
+$lang['from'] = 'From';
+
+$lang['na'] = 'N/A';
+
+$lang['tbl_err'] = 'You must leave at least one table.';
+
+$lang['method'] = 'Method';
+
+
+// form check
+$lang['empty_post'] = 'Nothing was sent.';
+$lang['post_err'] = 'You must enter at least 1 rate per table in order to proceed.';
\ No newline at end of file
diff --git a/gocart/libraries/shipping/tablerate/tablerate.php b/gocart/packages/shipping/tablerate/libraries/tablerate.php
similarity index 85%
rename from gocart/libraries/shipping/tablerate/tablerate.php
rename to gocart/packages/shipping/tablerate/libraries/tablerate.php
index 948fcc53..fc060f6f 100644
--- a/gocart/libraries/shipping/tablerate/tablerate.php
+++ b/gocart/packages/shipping/tablerate/libraries/tablerate.php
@@ -8,8 +8,7 @@ class tablerate
function tablerate()
{
$this->CI =& get_instance();
- $this->CI->load->model(array('Settings_model', 'location_model'));
- $this->CI->load->library('session');
+ $this->CI->lang->load('tablerate');
}
function rates()
@@ -42,7 +41,7 @@ function rates()
$order_weight = $this->get_order_weight();
$order_price = $this->get_order_price();
- $countries = $this->CI->location_model->get_countries();
+ $countries = $this->CI->Location_model->get_countries();
$rates = array();
@@ -104,13 +103,13 @@ function install()
,'10' => '15.00'
,'0' => '5.00');
- $table = array('Table_Rate' => $rates);
+ $table = array('Example' => $rates);
//note that the code here is plural, these are the rates
$this->CI->Settings_model->save_settings('tablerates', array('rates' => serialize($table)));
$this->CI->Settings_model->save_settings('tablerate', array('enabled'=>'0',
- 'method'=>serialize(array('Table_Rate'=>'price')),
- 'location'=>serialize(array('Table_Rate'=>'')) //location is by country ID
+ 'method'=>serialize(array('Example'=>'price')),
+ 'location'=>serialize(array('Example'=>'')) //location is by country ID
));
}
@@ -142,34 +141,29 @@ function form($post = false)
$rates = $this->organize_post_rates($post['rates']);
}
- $countries = $this->CI->location_model->get_countries_menu();
-
- //set weight and price to blank by default
- $weight = '';
- $price = '';
+ $countries = $this->CI->Location_model->get_countries_menu();
// fetch form contents
- ob_start();
- include('form.php');
- $form = ob_get_contents();
- ob_end_clean();
+ $data = array('settings'=>$settings,
+ 'rates' =>$rates,
+ 'countries' =>$countries );
+ return $this->CI->load->view('admin_form', $data, true);
- return $form;
}
function check()
{
if(empty($_POST))
{
- return 'Nothing was sent
';
+ return ''.lang('empty_post').'
';
}
foreach($_POST['from'] as $table=>$list)
{
if(empty($list))
{
- return 'You must enter at least 1 rate per table in order to proceed.
';
+ return ''.lang('post_err').'
';
}
}
diff --git a/gocart/libraries/shipping/tablerate/form.php b/gocart/packages/shipping/tablerate/views/admin_form.php
similarity index 59%
rename from gocart/libraries/shipping/tablerate/form.php
rename to gocart/packages/shipping/tablerate/views/admin_form.php
index 39ac5454..e5886bfb 100644
--- a/gocart/libraries/shipping/tablerate/form.php
+++ b/gocart/packages/shipping/tablerate/views/admin_form.php
@@ -1,4 +1,5 @@
-Note: Note Fields that are left blank or contain non-numeric will be removed.
+
+This is a legacy shipping method and is no longer being updated. table_rate is now the standard table rate shipping module and if you are using this method you should migrate to the new one.
- Table Rate Module Status:
+
- Add New Table
+
@@ -200,17 +205,17 @@ function apply_rename(tbl_id, tbl_name)
$disp_name = str_replace('_', ' ', $name);
?>
-
Rates (
Remove this table) (
Rename this table)
+
(
) (
)
- By Country |
+ |
|
- Method: |
+ | : |
|
- Rates: |
+ : |
- From: |
- Rate: |
- (remove) (add above) (add below)
+ | : |
+ : |
+ () () ()
|
CI =& get_instance();
+ $this->CI->lang->load('ups');
+
+ // standard services
+ $this->ups_services = array(
+ '01' => 'UPS Next Day Air',
+ '02' => 'UPS Second Day Air',
+ '03' => 'UPS Ground',
+ '07' => 'UPS Worldwide Express',
+ '08' => 'UPS Worldwide Expedited',
+ '11' => 'UPS Standard',
+ '12' => 'UPS Three-Day Select',
+ '13' => 'UPS Next Day Air Saver',
+ '14' => 'UPS Next Day Air Early AM',
+ '54' => 'UPS Worldwide Express Plus',
+ '59' => 'UPS Second Day Air AM',
+ '65' => 'UPS Saver'
+ );
+
+ }
+
+
+ function rates( )
+ {
+
+ // load settings
+ if($settings = $this->CI->Settings_model->get_settings('united_parcel_service')) {
+ $access_key = $settings['access_key'];
+ $ups_account_username = $settings['ups_account_username'];
+ $ups_account_password = $settings['ups_account_password'];
+ $enabled = $settings['enabled'];
+ $services = explode(',', $settings['services']);
+ $handling_method = $settings['handling_method'];
+ $handling_amount = $settings['handling_amount'];
+ } else {
+ return array(); // no settings, no compute
+ }
+
+ $zip_code = $this->CI->config->item('zip');
+ $customer = $this->CI->go_cart->customer();
+ $weight = $this->CI->go_cart->order_weight();
+ $currency = $this->CI->config->item('currency');
+ $insured_value = $this->CI->go_cart->order_insurable_value();
+
+ // shipping address will always be there
+ $destination_zip = $customer['ship_address']['zip'];
+
+
+ $data ="
+
+ $access_key
+ $ups_account_username
+ $ups_account_password
+
+
+
+
+
+ Rating and Service
+ 1.0001
+
+ Rate
+ shop
+
+
+ 01
+
+
+
+
+ $zip_code
+
+
+
+
+ $destination_zip
+
+
+
+
+ 02
+ Package
+
+ Rate Shopping
+
+ $weight
+
+
+ $currency
+ $insured_value
+
+
+
+
+ ";
+
+
+ $ch = curl_init("https://www.ups.com/ups.app/xml/Rate");
+ curl_setopt($ch, CURLOPT_HEADER, 1);
+ curl_setopt($ch,CURLOPT_POST,1);
+ curl_setopt($ch,CURLOPT_TIMEOUT, 60);
+ curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
+ curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
+ curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
+ curl_setopt($ch,CURLOPT_POSTFIELDS,$data);
+ $result=curl_exec ($ch);
+
+ //die(print_r($result)); // uncomment to debug
+
+ $data = strstr($result, '');
+
+ $xml = new SimpleXMLElement($data);
+ if($xml->Response->ResponseStatusCode == '1')
+ {
+ foreach($xml->RatedShipment as $shipping_choice)
+ {
+ // only display the ones the admin has chosen to show
+ if(in_array($shipping_choice->Service->Code, $services))
+ {
+ $k = $this->ups_services[(string)$shipping_choice->Service->Code];
+ $amount = (string)$shipping_choice->TotalCharges->MonetaryValue;
+
+ if(is_numeric($handling_amount)) // valid entry?
+ {
+ if($handling_method=='$')
+ {
+ $amount += $handling_amount;
+ }
+ elseif($handling_method=='%')
+ {
+ $amount += $amount * ($handling_amount/100);
+ }
+ }
+
+ $shipping_choices[$k] = $amount;
+ }
+ }
+ return $shipping_choices;
+ }
+ else
+ {
+ //send back empty array on fail
+ return array();
+ }
+ }
+
+
+ function install()
+ {
+ $default_settings = array(
+ 'access_key' => '',
+ 'ups_account_username' => '',
+ 'ups_account_password' => '',
+ 'services' => '11',
+ 'handling_method' => '$',
+ 'handling_amount' => '5',
+ 'enabled' => '0'
+ );
+ //set a default blank setting for flatrate shipping
+ $this->CI->Settings_model->save_settings('united_parcel_service', $default_settings);
+ }
+
+ function uninstall()
+ {
+ $this->CI->Settings_model->delete_settings('united_parcel_service');
+ }
+
+ function form($post = false)
+ {
+
+ $this->CI->load->helper('form');
+
+ //this same function processes the form
+ if(!$post)
+ {
+ $settings = $this->CI->Settings_model->get_settings('united_parcel_service');
+ $access_key = $settings['access_key'];
+ $username = $settings['ups_account_username'];
+ $password = $settings['ups_account_password'];
+ $services = explode(',', $settings['services']);
+ $handling_method = $settings['handling_method'];
+ $handling_amount = $settings['handling_amount'];
+ $enabled = $settings['enabled'];
+ }
+ else
+ {
+ $access_key = $post['access_key'];
+ $username = $post['ups_account_username'];
+ $password = $post['ups_account_password'];
+ $services = $post['services'];
+ $handling_method = $post['handling_method'];
+ $handling_amount = $post['handling_amount'];
+ $enabled = $post['enabled'];
+ }
+
+ ob_start();
+ ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ups_services as $id=>$opt):?>
+
+
+
+
+ '$', '%'=>'%'), $handling_method, 'class="span1"');?>
+
+
+
+
+
+ CI->input->post();
+ $settings['services'] = implode(',', $settings['services']);
+
+ //we save the settings if it gets here
+ $this->CI->Settings_model->save_settings('united_parcel_service', $settings);
+
+ return false;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/gocart/packages/shipping/usps_domestic/language/english/usps_domestic_lang.php b/gocart/packages/shipping/usps_domestic/language/english/usps_domestic_lang.php
new file mode 100644
index 00000000..8b29bec8
--- /dev/null
+++ b/gocart/packages/shipping/usps_domestic/language/english/usps_domestic_lang.php
@@ -0,0 +1,40 @@
+CI =& get_instance();
$this->CI->load->model('Settings_model');
-
+ $this->CI->lang->load('usps_domestic');
$this->service_list = array(
// Domestic Services
@@ -61,27 +69,27 @@ function usps_domestic()
function rates()
{
-
+
$this->CI->load->library('session');
-
+
// get customer info
$customer = $this->CI->go_cart->customer();
$dest_zip = $customer['ship_address']['zip'];
$dest_country = $customer['ship_address']['country'];
-
+
//grab this information from the config file
$country = $this->CI->config->item('country');
$orig_zip = $this->CI->config->item('zip');
-
+
// retrieve settings
$settings = $this->CI->Settings_model->get_settings('usps_domestic');
-
+
//check if we're enabled
if(!$settings['enabled'] || $settings['enabled'] < 1)
{
return array();
}
-
+
$user = $settings['username'];
$pass = $settings['password'];
$service = explode(',',$settings['service']);
@@ -90,155 +98,155 @@ function rates()
$machinable = $settings['machinable'];
$handling_method = $settings['handling_method'];
$handling_amount = $settings['handling_amount'];
-
+
// build allowed service list
foreach($service as $s)
{
$service_list[] = $this->service_list[$s];
}
-
+
//set the weight
$weight = $this->CI->go_cart->order_weight();
-
+
// value of contents
$total = $this->CI->go_cart->order_insurable_value();
-
+
//strip the decimal
$oz = ($weight-(floor($weight)))*100;
//set pounds
$lbs = floor($weight);
//set ounces based on decimal
$oz = round(($oz*16)/100);
-
+
// no foreign support
if($country!="US")
- {
- return array();
- }
-
+ {
+ return array();
+ }
+
// no intl shipping in this lib
if($dest_country!='United States')
{
return array();
}
-
+
// send a standard test request
if($settings['mode'] == 'test')
{
-
+
$str = '';
- $str .= 'All10022';
- $str .= '20008';
- $str .= '105';
- $str .= 'Flat Rate BoxLARGE';
- $str .= 'True';
-
- $str = $this->testserver .'?API=RateV2&XML='. urlencode($str);
-
+ $str .= $user . '">';
+ $str .= 'All10022';
+ $str .= '20008';
+ $str .= '105';
+ $str .= 'Flat Rate BoxLARGE';
+ $str .= 'True';
+
+ $str = $this->testserver .'?API=RateV2&XML='. urlencode($str);
+
}
else
{
-
+
// Domestic Rates
$str = '';
- $str .= $user . '">';
- $str .= 'ALL'.$orig_zip.'';
- $str .= ''.$dest_zip.'';
- $str .= ''.$lbs.''.$oz.'';
- $str .= '' . $container .''.$size.'';
- $str .= ''.$machinable.'';
-
+ //$str .= $user . '" PASSWORD="' . $pass . '">';
+ $str .= $user . '">';
+ $str .= 'ALL'.$orig_zip.'';
+ $str .= ''.$dest_zip.'';
+ $str .= ''.$lbs.''.$oz.'';
+ $str .= '' . $container .''.$size.'';
+ $str .= ''.$machinable.'';
+
$str = $this->liveserver .'?API=RateV4&XML='. urlencode($str);
-
+
}
-
-
- $ch = curl_init();
- // set URL and other appropriate options
- curl_setopt($ch, CURLOPT_URL, $str);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
-
- // grab URL and pass it to the browser
- $ats = curl_exec($ch);
-
- // close curl resource, and free up system resources
- curl_close($ch);
- //$xmlParser = new xmlparser();
- $this->CI->load->library('xmlparser');
- $array = $this->CI->xmlparser->GetXMLTree($ats);
-
-
-
- if(isset($array['ERROR']))
- {
- var_dump($array);
-
- return array(); // if the request failed, just send back an empty set
- }
-
- $rates = array();
-
-
-
- // Parse test mode response
- if($settings['mode'] == 'test')
+
+
+ $ch = curl_init();
+ // set URL and other appropriate options
+ curl_setopt($ch, CURLOPT_URL, $str);
+ curl_setopt($ch, CURLOPT_HEADER, 0);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+
+ // grab URL and pass it to the browser
+ $ats = curl_exec($ch);
+
+ // close curl resource, and free up system resources
+ curl_close($ch);
+ //$xmlParser = new xmlparser();
+ $this->CI->load->library('xmlparser');
+ $array = $this->CI->xmlparser->GetXMLTree($ats);
+
+
+
+ if(isset($array['ERROR']))
{
- foreach ($array['RATEV2RESPONSE'][0]['PACKAGE'][0]['POSTAGE'] as $value)
- {
-
- $amount = $value['RATE'][0]['VALUE'];
-
- if(is_numeric($handling_amount)) // valid entry?
- {
-
- if($handling_method=='$')
- {
- $amount += $handling_amount;
- }
- elseif($handling_method=='%')
- {
- $amount += $amount * ($handling_amount/100);
- }
- }
-
- $rates[$value['MAILSERVICE'][0]['VALUE']] = $amount;
-
- }
-
- // Parse live response
- } else {
- //var_dump($service_list);
-
- foreach ($array['RATEV4RESPONSE'][0]['PACKAGE'][0]['POSTAGE'] as $value)
- {
- //echo $value['MAILSERVICE'][0]['VALUE']."\n";
- if(in_array($value['MAILSERVICE'][0]['VALUE'],$service_list))
- {
- $amount = $value['RATE'][0]['VALUE'];
-
- if(is_numeric($handling_amount)) // valid entry?
- {
-
- if($handling_method=='$')
- {
- $amount += $handling_amount;
- }
- elseif($handling_method=='%')
- {
- $amount += $amount * ($handling_amount/100);
- }
- }
-
- $rates[$value['MAILSERVICE'][0]['VALUE']] = $amount;
- }
- }
-
- }
-
- return $rates;
+ var_dump($array);
+
+ return array(); // if the request failed, just send back an empty set
+ }
+
+ $rates = array();
+
+
+
+ // Parse test mode response
+ if($settings['mode'] == 'test')
+ {
+ foreach ($array['RATEV2RESPONSE'][0]['PACKAGE'][0]['POSTAGE'] as $value)
+ {
+
+ $amount = $value['RATE'][0]['VALUE'];
+
+ if(is_numeric($handling_amount)) // valid entry?
+ {
+
+ if($handling_method=='$')
+ {
+ $amount += $handling_amount;
+ }
+ elseif($handling_method=='%')
+ {
+ $amount += $amount * ($handling_amount/100);
+ }
+ }
+
+ $rates[$value['MAILSERVICE'][0]['VALUE']] = $amount;
+
+ }
+
+ // Parse live response
+ } else {
+ //var_dump($service_list);
+
+ foreach ($array['RATEV4RESPONSE'][0]['PACKAGE'][0]['POSTAGE'] as $value)
+ {
+ //echo $value['MAILSERVICE'][0]['VALUE']."\n";
+ if(in_array($value['MAILSERVICE'][0]['VALUE'],$service_list))
+ {
+ $amount = $value['RATE'][0]['VALUE'];
+
+ if(is_numeric($handling_amount)) // valid entry?
+ {
+
+ if($handling_method=='$')
+ {
+ $amount += $handling_amount;
+ }
+ elseif($handling_method=='%')
+ {
+ $amount += $amount * ($handling_amount/100);
+ }
+ }
+
+ $rates[$value['MAILSERVICE'][0]['VALUE']] = $amount;
+ }
+ }
+
+ }
+
+ return $rates;
}
function install()
@@ -294,7 +302,7 @@ function form($post = false)
else
{
$container = $post['container'];
- $service = explode(',',$post['service']);
+ $service = $post['service'];
$username = $post['username'];
$password = $post['password'];
$mode = $post['mode'];
@@ -309,83 +317,85 @@ function form($post = false)
$handling_amount = $post['handling_amount'];
}
- $form = 'Username: | '.form_input('username', $username, 'class="gc_tf1"') .' |
- Password: | '.form_input('password', $password, 'class="gc_tf1"') .' |
- Mode: | ';
-
- $opts = array('test'=>'Test', 'live'=>'Live');
-
- $form .= form_dropdown('mode', $opts, $mode);
+ ob_start();
+ ?>
+ |
Services To Offer: | ';
+
+
- foreach($this->service_list as $id=>$opt)
- {
- $form .= "";
- }
-
-
-
-
- $form .= ' |
Container: | ';
-
-
- $opts = array('VARIABLE'=>'Variable',
- 'FLAT RATE BOX'=>'Flat Rate Box',
- 'MD FLAT RATE BOX'=>'Medium Flat Rate Box',
- 'LG FLAT RATE BOX'=>'Large Flat Rate Box',
- 'FLAT RATE ENVELOPE'=>'Flat Rate Envelope',
- 'RECTANGULAR'=>'Rectangular',
- 'NONRECTANGULAR'=>'Non Rectangular'
- );
-
- $form .= form_dropdown('container', $opts, $container);
+
+ lang('test'), 'live'=>lang('live')), $mode);?>
- $form .= ' |
Size: | ';
-
-
- $opts = array('REGULAR'=>'Regular',
- 'LARGE'=>'Large',
- 'OVERSIZE'=>'Oversize'
- );
-
- $form .= form_dropdown('size', $opts, $size);
-
- $form .= ' |
(Dimensions required for size LARGE) | ';
-
- $form .= '
Pkg Length: | ';
- $form .= form_input('length', $length, 'class="gc_tf1"');
-
- $form .= ' |
Pkg Width: | ';
- $form .= form_input('width', $width, 'class="gc_tf1"');
-
- $form .= ' |
Pkg Height: | ';
- $form .= form_input('height', $height, 'class="gc_tf1"');
-
- $form .= ' |
Pkg Girth: | ';
- $form .= form_input('girth', $girth, 'class="gc_tf1"');
-
- $form .= ' |
Machinable: | ';
-
- $opts = array('TRUE'=>'True', 'FALSE'=>'False');
-
- $form .= form_dropdown('machinable', $opts, $machinable);
-
- $form .= ' |
Handling Fee: | ';
-
- $form .= form_dropdown('handling_method', array('$'=>'$', '%'=>'%'), $handling_method);
-
- $form .= ' '. form_input('handling_amount', $handling_amount, 'class="gc_tf1"');
-
- $form .= ' |
Module Status: | ';
-
- $opts = array('Disabled', 'Enabled');
-
- $form .= form_dropdown('enabled', $opts, $enabled);
-
- $form .= ' |
';
+
+
+ service_list as $id=>$opt):?>
+
+
+
+
+ lang('variable'),
+ 'FLAT RATE BOX'=>lang('flat_rate_box'),
+ 'MD FLAT RATE BOX'=>lang('medium_flat_rate_box'),
+ 'LG FLAT RATE BOX'=>lang('large_flat_rate_box'),
+ 'FLAT RATE ENVELOPE'=>lang('flat_rate_envelope'),
+ 'RECTANGULAR'=>lang('rectangular'),
+ 'NONRECTANGULAR'=>lang('non_rectangular')
+ );
+
+ echo form_dropdown('container', $opts, $container, 'class="span3"');?>
+
+
+ lang('regular'),
+ 'LARGE'=>lang('large'),
+ 'OVERSIZE'=>lang('oversize')
+ );
+ echo form_dropdown('size', $opts, $size, 'class="span3"');?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lang('yes'), 'FALSE'=>lang('no')), $machinable, 'class="span3"');?>
+
+
+
+
+
+
+ '$', '%'=>'%'), $handling_method, 'class="span1"');?>
+
+
+
+
+
+
+ CI =& get_instance();
$this->CI->load->model('Settings_model');
-
+ $this->CI->lang->load('usps_international');
$this->service_list = array(
@@ -64,15 +64,15 @@ function rates()
return array();
}
- $user = $settings['username'];
- $pass = $settings['password'];
- $service = explode(',',$settings['service']);
- $mailtype = $settings['mailtype'];
- $container = $settings['container'];
- $size = $settings['size'];
- $machinable = $settings['machinable'];
- $handling_method = $settings['handling_method'];
- $handling_amount = $settings['handling_amount'];
+ $user = $settings['username'];
+ $pass = $settings['password'];
+ $service = explode(',',$settings['service']);
+ $mailtype = $settings['mailtype'];
+ $container = $settings['container'];
+ $size = $settings['size'];
+ $machinable = $settings['machinable'];
+ $handling_method = $settings['handling_method'];
+ $handling_amount = $settings['handling_amount'];
// build allowed service list
foreach($service as $s)
@@ -172,21 +172,21 @@ function rates()
function install()
{
- $default_settings = array(
- 'username'=>'',
- 'password'=>'',
- 'mailtype'=>'ALL',
- 'container'=>'RECTANGULAR',
- 'service' => implode(',', array_keys($this->service_list)),
- 'size'=>'LARGE',
- 'length'=>'',
- 'width'=>'',
- 'height'=>'',
- 'girth'=>'',
- 'machinable'=>'true',
- 'handling_method'=>'$',
- 'handling_amount'=>5,
- 'enabled'=>'0'
+ $default_settings = array(
+ 'username' => '',
+ 'password' => '',
+ 'mailtype' => 'ALL',
+ 'container' => 'RECTANGULAR',
+ 'service' => implode(',', array_keys($this->service_list)),
+ 'size' => 'LARGE',
+ 'length' => '',
+ 'width' => '',
+ 'height' => '',
+ 'girth' => '',
+ 'machinable' => 'true',
+ 'handling_method' => '$',
+ 'handling_amount' => 5,
+ 'enabled' => '0'
);
//set a default blank setting for flatrate shipping
$this->CI->Settings_model->save_settings('usps_international', $default_settings);
@@ -204,114 +204,116 @@ function form($post = false)
//this same function processes the form
if(!$post)
{
- $settings = $this->CI->Settings_model->get_settings('usps_international');
- $mailtype = $settings['mailtype'];
- $container = $settings['container'];
- $service = explode(',', $settings['service']);
- $username = $settings['username'];
- $password = $settings['password'];
- $enabled = $settings['enabled'];
- $size = $settings['size'];
- $length = $settings['length'];
- $width = $settings['width'];
- $height = $settings['height'];
- $girth = $settings['girth'];
- $machinable = $settings['machinable'];
- $handling_method = $settings['handling_method'];
- $handling_amount = $settings['handling_amount'];
+ $settings = $this->CI->Settings_model->get_settings('usps_international');
+ $mailtype = $settings['mailtype'];
+ $container = $settings['container'];
+ $service = explode(',', $settings['service']);
+ $username = $settings['username'];
+ $password = $settings['password'];
+ $enabled = $settings['enabled'];
+ $size = $settings['size'];
+ $length = $settings['length'];
+ $width = $settings['width'];
+ $height = $settings['height'];
+ $girth = $settings['girth'];
+ $machinable = $settings['machinable'];
+ $handling_method = $settings['handling_method'];
+ $handling_amount = $settings['handling_amount'];
}
else
{
- $mailtype = $post['mailtype'];
- $container = $post['container'];
- $service = $post['service'];
- $username = $post['username'];
- $password = $post['password'];
- $enabled = $post['enabled'];
- $size = $post['size'];
- $length = $post['length'];
- $width = $post['width'];
- $height = $post['height'];
- $girth = $post['girth'];
- $machinable = $post['machinable'];
- $handling_method = $post['handling_method'];
- $handling_amount = $post['handling_amount'];
+ $mailtype = $post['mailtype'];
+ $container = $post['container'];
+ $service = $post['service'];
+ $username = $post['username'];
+ $password = $post['password'];
+ $enabled = $post['enabled'];
+ $size = $post['size'];
+ $length = $post['length'];
+ $width = $post['width'];
+ $height = $post['height'];
+ $girth = $post['girth'];
+ $machinable = $post['machinable'];
+ $handling_method = $post['handling_method'];
+ $handling_amount = $post['handling_amount'];
}
-
- $form = 'Username: | '.form_input('username', $username) .' |
';
- //Password: | '.form_input('password', $password) .' |
';
-
- $form .= 'Services To Offer: | ';
-
- foreach($this->service_list as $id=>$opt)
- {
- $form .= "";
- }
-
-
- $form .= ' |
Mailtype: | ';
-
- $opts = array(
- 'ALL'=>'All',
- 'PACKAGE'=>'Package',
- 'ENVELOPE'=>'envelope'
- );
-
- $form .= form_dropdown('mailtype', $opts, $mailtype);
-
- $form .= ' |
Container: | ';
-
-
+ ob_start();
+ ?>
+
+
+
+
+
+
+
+
+ service_list as $id=>$opt):?>
+
+
+
+
+
+ lang('all'),
+ 'PACKAGE' =>lang('package'),
+ 'ENVELOPE' =>lang('envelope')
+ );
+
+ echo form_dropdown('mailtype', $opts, $mailtype, 'class="span3"');?>
+
+
+ 'Rectangular',
- 'NONRECTANGULAR'=>'Non Rectangular'
+ 'RECTANGULAR'=>lang('rectangular'),
+ 'NONRECTANGULAR'=>lang('non_rectangular')
);
-
- $form .= form_dropdown('container', $opts, $container);
+ echo form_dropdown('container', $opts, $container, 'class="span3"');?>
- $form .= ' |
Size: | ';
-
-
- $opts = array('REGULAR'=>'Regular',
- 'LARGE'=>'Large',
- 'OVERSIZE'=>'Oversize'
- );
-
- $form .= form_dropdown('size', $opts, $size);
-
- $form .= ' |
Pkg Length: | ';
- $form .= form_input('length', $length);
-
- $form .= ' |
Pkg Width: | ';
- $form .= form_input('width', $width);
-
- $form .= ' |
Pkg Height: | ';
- $form .= form_input('height', $height);
-
- $form .= ' |
Pkg Girth: | ';
- $form .= form_input('girth', $girth);
-
- $form .= ' |
Machinable: | ';
-
- $opts = array('TRUE'=>'True', 'FALSE'=>'False');
-
- $form .= form_dropdown('machinable', $opts, $machinable);
-
- $form .= ' |
Handling Fee: | ';
-
- $form .= form_dropdown('handling_method', array('$'=>'$', '%'=>'%'), $handling_method);
-
- $form .= ' '. form_input('handling_amount', $handling_amount);
-
- $form .= ' |
Module Status: | ';
-
- $opts = array('Disabled', 'Enabled');
-
- $form .= form_dropdown('enabled', $opts, $enabled);
-
- $form .= ' |
';
+
+ lang('regular'),
+ 'LARGE'=>lang('large'),
+ 'OVERSIZE'=>lang('oversize')
+ );
+ echo form_dropdown('size', $opts, $size, 'class="span3"');?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ lang('yes'), 'FALSE'=>lang('no')), $machinable, 'class="span3"');?>
+
+
+
+
+ '$', '%'=>'%'), $handling_method, 'class="span1"');?>
+
+
+
+
+
+
+ label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.modal{position:absolute;top:10px;right:10px;left:10px;width:auto;margin:0}.modal.fade.in{top:auto}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:auto;margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:20px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.762430939%;*margin-left:2.709239449638298%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:99.999999993%;*width:99.9468085036383%}.row-fluid .span11{width:91.436464082%;*width:91.38327259263829%}.row-fluid .span10{width:82.87292817100001%;*width:82.8197366816383%}.row-fluid .span9{width:74.30939226%;*width:74.25620077063829%}.row-fluid .span8{width:65.74585634900001%;*width:65.6926648596383%}.row-fluid .span7{width:57.182320438000005%;*width:57.129128948638304%}.row-fluid .span6{width:48.618784527%;*width:48.5655930376383%}.row-fluid .span5{width:40.055248616%;*width:40.0020571266383%}.row-fluid .span4{width:31.491712705%;*width:31.4385212156383%}.row-fluid .span3{width:22.928176794%;*width:22.874985304638297%}.row-fluid .span2{width:14.364640883%;*width:14.311449393638298%}.row-fluid .span1{width:5.801104972%;*width:5.747913482638298%}input,textarea,.uneditable-input{margin-left:0}input.span12,textarea.span12,.uneditable-input.span12{width:714px}input.span11,textarea.span11,.uneditable-input.span11{width:652px}input.span10,textarea.span10,.uneditable-input.span10{width:590px}input.span9,textarea.span9,.uneditable-input.span9{width:528px}input.span8,textarea.span8,.uneditable-input.span8{width:466px}input.span7,textarea.span7,.uneditable-input.span7{width:404px}input.span6,textarea.span6,.uneditable-input.span6{width:342px}input.span5,textarea.span5,.uneditable-input.span5{width:280px}input.span4,textarea.span4,.uneditable-input.span4{width:218px}input.span3,textarea.span3,.uneditable-input.span3{width:156px}input.span2,textarea.span2,.uneditable-input.span2{width:94px}input.span1,textarea.span1,.uneditable-input.span1{width:32px}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:30px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.564102564%;*margin-left:2.510911074638298%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145300001%;*width:91.3997999636383%}.row-fluid .span10{width:82.905982906%;*width:82.8527914166383%}.row-fluid .span9{width:74.358974359%;*width:74.30578286963829%}.row-fluid .span8{width:65.81196581200001%;*width:65.7587743226383%}.row-fluid .span7{width:57.264957265%;*width:57.2117657756383%}.row-fluid .span6{width:48.717948718%;*width:48.6647572286383%}.row-fluid .span5{width:40.170940171000005%;*width:40.117748681638304%}.row-fluid .span4{width:31.623931624%;*width:31.5707401346383%}.row-fluid .span3{width:23.076923077%;*width:23.0237315876383%}.row-fluid .span2{width:14.529914530000001%;*width:14.4767230406383%}.row-fluid .span1{width:5.982905983%;*width:5.929714493638298%}input,textarea,.uneditable-input{margin-left:0}input.span12,textarea.span12,.uneditable-input.span12{width:1160px}input.span11,textarea.span11,.uneditable-input.span11{width:1060px}input.span10,textarea.span10,.uneditable-input.span10{width:960px}input.span9,textarea.span9,.uneditable-input.span9{width:860px}input.span8,textarea.span8,.uneditable-input.span8{width:760px}input.span7,textarea.span7,.uneditable-input.span7{width:660px}input.span6,textarea.span6,.uneditable-input.span6{width:560px}input.span5,textarea.span5,.uneditable-input.span5{width:460px}input.span4,textarea.span4,.uneditable-input.span4{width:360px}input.span3,textarea.span3,.uneditable-input.span3{width:260px}input.span2,textarea.span2,.uneditable-input.span2{width:160px}input.span1,textarea.span1,.uneditable-input.span1{width:60px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:18px}.navbar-fixed-bottom{margin-top:18px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 9px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#999;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:6px 15px;font-weight:bold;color:#999;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#222}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:block;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:9px 15px;margin:9px 0;border-top:1px solid #222;border-bottom:1px solid #222;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}}
diff --git a/gocart/themes/default/assets/css/bootstrap.min.css b/gocart/themes/default/assets/css/bootstrap.min.css
new file mode 100644
index 00000000..b74b4546
--- /dev/null
+++ b/gocart/themes/default/assets/css/bootstrap.min.css
@@ -0,0 +1,9 @@
+/*!
+ * Bootstrap v2.0.4
+ *
+ * Copyright 2012 Twitter, Inc
+ * Licensed under the Apache License v2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Designed and built with all the love in the world @twitter by @mdo and @fat.
+ */article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:28px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;line-height:18px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover{color:#005580;text-decoration:underline}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;content:""}.row:after{clear:both}[class*="span"]{float:left;margin-left:20px}.container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:28px;margin-left:2.127659574%;*margin-left:2.0744680846382977%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .span12{width:99.99999998999999%;*width:99.94680850063828%}.row-fluid .span11{width:91.489361693%;*width:91.4361702036383%}.row-fluid .span10{width:82.97872339599999%;*width:82.92553190663828%}.row-fluid .span9{width:74.468085099%;*width:74.4148936096383%}.row-fluid .span8{width:65.95744680199999%;*width:65.90425531263828%}.row-fluid .span7{width:57.446808505%;*width:57.3936170156383%}.row-fluid .span6{width:48.93617020799999%;*width:48.88297871863829%}.row-fluid .span5{width:40.425531911%;*width:40.3723404216383%}.row-fluid .span4{width:31.914893614%;*width:31.8617021246383%}.row-fluid .span3{width:23.404255317%;*width:23.3510638276383%}.row-fluid .span2{width:14.89361702%;*width:14.8404255306383%}.row-fluid .span1{width:6.382978723%;*width:6.329787233638298%}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;content:""}.container-fluid:after{clear:both}p{margin:0 0 9px}p small{font-size:11px;color:#999}.lead{margin-bottom:18px;font-size:20px;font-weight:200;line-height:27px}h1,h2,h3,h4,h5,h6{margin:0;font-family:inherit;font-weight:bold;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;color:#999}h1{font-size:30px;line-height:36px}h1 small{font-size:18px}h2{font-size:24px;line-height:36px}h2 small{font-size:18px}h3{font-size:18px;line-height:27px}h3 small{font-size:14px}h4,h5,h6{line-height:18px}h4{font-size:14px}h4 small{font-size:12px}h5{font-size:12px}h6{font-size:11px;color:#999;text-transform:uppercase}.page-header{padding-bottom:17px;margin:18px 0;border-bottom:1px solid #eee}.page-header h1{line-height:1}ul,ol{padding:0;margin:0 0 9px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}ul{list-style:disc}ol{list-style:decimal}li{line-height:18px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}dl{margin-bottom:18px}dt,dd{line-height:18px}dt{font-weight:bold;line-height:17px}dd{margin-left:9px}.dl-horizontal dt{float:left;width:120px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:130px}hr{margin:18px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}strong{font-weight:bold}em{font-style:italic}.muted{color:#999}abbr[title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 18px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:22.5px}blockquote small{display:block;line-height:18px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:18px;font-style:normal;line-height:18px}small{font-size:100%}cite{font-style:normal}code,pre{padding:0 3px 2px;font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:8.5px;margin:0 0 9px;font-size:12.025px;line-height:18px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:18px}pre code{padding:0;color:inherit;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 18px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:27px;font-size:19.5px;line-height:36px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:13.5px;color:#999}label,input,button,select,textarea{font-size:13px;font-weight:normal;line-height:18px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:18px;padding:4px;margin-bottom:9px;font-size:13px;line-height:18px;color:#555}input,textarea{width:210px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-ms-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:3px 0;*margin-top:0;line-height:normal;cursor:pointer}input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}.uneditable-textarea{width:auto;height:auto}select,input[type="file"]{height:28px;*margin-top:4px;line-height:28px}select{width:220px;border:1px solid #bbb}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.radio,.checkbox{min-height:18px;padding-left:18px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-18px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}input.span12,textarea.span12,.uneditable-input.span12{width:930px}input.span11,textarea.span11,.uneditable-input.span11{width:850px}input.span10,textarea.span10,.uneditable-input.span10{width:770px}input.span9,textarea.span9,.uneditable-input.span9{width:690px}input.span8,textarea.span8,.uneditable-input.span8{width:610px}input.span7,textarea.span7,.uneditable-input.span7{width:530px}input.span6,textarea.span6,.uneditable-input.span6{width:450px}input.span5,textarea.span5,.uneditable-input.span5{width:370px}input.span4,textarea.span4,.uneditable-input.span4{width:290px}input.span3,textarea.span3,.uneditable-input.span3{width:210px}input.span2,textarea.span2,.uneditable-input.span2{width:130px}input.span1,textarea.span1,.uneditable-input.span1{width:50px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee;border-color:#ddd}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning>label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;border-color:#c09853}.control-group.warning .checkbox:focus,.control-group.warning .radio:focus,.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:0 0 6px #dbc59e;-moz-box-shadow:0 0 6px #dbc59e;box-shadow:0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error>label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;border-color:#b94a48}.control-group.error .checkbox:focus,.control-group.error .radio:focus,.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:0 0 6px #d59392;-moz-box-shadow:0 0 6px #d59392;box-shadow:0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success>label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;border-color:#468847}.control-group.success .checkbox:focus,.control-group.success .radio:focus,.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:0 0 6px #7aba7b;-moz-box-shadow:0 0 6px #7aba7b;box-shadow:0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}input:focus:required:invalid,textarea:focus:required:invalid,select:focus:required:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:required:invalid:focus,textarea:focus:required:invalid:focus,select:focus:required:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;content:""}.form-actions:after{clear:both}.uneditable-input{overflow:hidden;white-space:nowrap;cursor:not-allowed;background-color:#fff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}:-moz-placeholder{color:#999}:-ms-input-placeholder{color:#999}::-webkit-input-placeholder{color:#999}.help-block,.help-inline{color:#555}.help-block{display:block;margin-bottom:9px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-prepend,.input-append{margin-bottom:5px}.input-prepend input,.input-append input,.input-prepend select,.input-append select,.input-prepend .uneditable-input,.input-append .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:middle;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-prepend input:focus,.input-append input:focus,.input-prepend select:focus,.input-append select:focus,.input-prepend .uneditable-input:focus,.input-append .uneditable-input:focus{z-index:2}.input-prepend .uneditable-input,.input-append .uneditable-input{border-left-color:#ccc}.input-prepend .add-on,.input-append .add-on{display:inline-block;width:auto;height:18px;min-width:16px;padding:4px 5px;font-weight:normal;line-height:18px;text-align:center;text-shadow:0 1px 0 #fff;vertical-align:middle;background-color:#eee;border:1px solid #ccc}.input-prepend .add-on,.input-append .add-on,.input-prepend .btn,.input-append .btn{margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend .active,.input-append .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-append .uneditable-input{border-right-color:#ccc;border-left-color:#eee}.input-append .add-on:last-child,.input-append .btn:last-child{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:14px;-moz-border-radius:14px;border-radius:14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:9px}legend+.control-group{margin-top:18px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:18px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:140px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:160px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:160px}.form-horizontal .help-block{margin-top:9px;margin-bottom:0}.form-horizontal .form-actions{padding-left:160px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:18px}.table th,.table td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapsed;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child th:first-child,.table-bordered tbody:first-child tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child th:last-child,.table-bordered tbody:first-child tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child th:first-child,.table-bordered tbody:last-child tr:last-child td:first-child{-webkit-border-radius:0 0 0 4px;-moz-border-radius:0 0 0 4px;border-radius:0 0 0 4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child th:last-child,.table-bordered tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-striped tbody tr:nth-child(odd) td,.table-striped tbody tr:nth-child(odd) th{background-color:#f9f9f9}.table tbody tr:hover td,.table tbody tr:hover th{background-color:#f5f5f5}table .span1{float:none;width:44px;margin-left:0}table .span2{float:none;width:124px;margin-left:0}table .span3{float:none;width:204px;margin-left:0}table .span4{float:none;width:284px;margin-left:0}table .span5{float:none;width:364px;margin-left:0}table .span6{float:none;width:444px;margin-left:0}table .span7{float:none;width:524px;margin-left:0}table .span8{float:none;width:604px;margin-left:0}table .span9{float:none;width:684px;margin-left:0}table .span10{float:none;width:764px;margin-left:0}table .span11{float:none;width:844px;margin-left:0}table .span12{float:none;width:924px;margin-left:0}table .span13{float:none;width:1004px;margin-left:0}table .span14{float:none;width:1084px;margin-left:0}table .span15{float:none;width:1164px;margin-left:0}table .span16{float:none;width:1244px;margin-left:0}table .span17{float:none;width:1324px;margin-left:0}table .span18{float:none;width:1404px;margin-left:0}table .span19{float:none;width:1484px;margin-left:0}table .span20{float:none;width:1564px;margin-left:0}table .span21{float:none;width:1644px;margin-left:0}table .span22{float:none;width:1724px;margin-left:0}table .span23{float:none;width:1804px;margin-left:0}table .span24{float:none;width:1884px;margin-left:0}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0}.icon-white{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{background-position:-384px -120px}.icon-folder-open{background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:"";opacity:.3;filter:alpha(opacity=30)}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown:hover .caret,.open .caret{opacity:1;filter:alpha(opacity=100)}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:4px 0;margin:1px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:8px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu a{display:block;padding:3px 15px;clear:both;font-weight:normal;line-height:18px;color:#333;white-space:nowrap}.dropdown-menu li>a:hover,.dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#fff;text-decoration:none;background-color:#08c}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:"\2191"}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.typeahead{margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #eee;border:1px solid rgba(0,0,0,0.05);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-ms-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-ms-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:18px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 10px 4px;margin-bottom:0;*margin-left:.3em;font-size:13px;line-height:18px;*line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-ms-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(top,#fff,#e6e6e6);background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffff',endColorstr='#e6e6e6',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover{color:#333;text-decoration:none;background-color:#e6e6e6;*background-color:#d9d9d9;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-ms-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-color:#e6e6e6;background-color:#d9d9d9 \9;background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-color:#e6e6e6;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:9px 14px;font-size:15px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.btn-large [class^="icon-"]{margin-top:1px}.btn-small{padding:5px 9px;font-size:11px;line-height:16px}.btn-small [class^="icon-"]{margin-top:-1px}.btn-mini{padding:2px 6px;font-size:11px;line-height:14px}.btn-primary,.btn-primary:hover,.btn-warning,.btn-warning:hover,.btn-danger,.btn-danger:hover,.btn-success,.btn-success:hover,.btn-info,.btn-info:hover,.btn-inverse,.btn-inverse:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn{border-color:#ccc;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.btn-primary{background-color:#0074cc;*background-color:#05c;background-image:-ms-linear-gradient(top,#08c,#05c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#05c));background-image:-webkit-linear-gradient(top,#08c,#05c);background-image:-o-linear-gradient(top,#08c,#05c);background-image:-moz-linear-gradient(top,#08c,#05c);background-image:linear-gradient(top,#08c,#05c);background-repeat:repeat-x;border-color:#05c #05c #003580;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#0088cc',endColorstr='#0055cc',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{background-color:#05c;*background-color:#004ab3}.btn-primary:active,.btn-primary.active{background-color:#004099 \9}.btn-warning{background-color:#faa732;*background-color:#f89406;background-image:-ms-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(top,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fbb450',endColorstr='#f89406',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{background-color:#da4f49;*background-color:#bd362f;background-image:-ms-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(top,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ee5f5b',endColorstr='#bd362f',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{background-color:#5bb75b;*background-color:#51a351;background-image:-ms-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(top,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#62c462',endColorstr='#51a351',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{background-color:#49afcd;*background-color:#2f96b4;background-image:-ms-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(top,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#5bc0de',endColorstr='#2f96b4',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{background-color:#414141;*background-color:#222;background-image:-ms-linear-gradient(top,#555,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#555),to(#222));background-image:-webkit-linear-gradient(top,#555,#222);background-image:-o-linear-gradient(top,#555,#222);background-image:-moz-linear-gradient(top,#555,#222);background-image:linear-gradient(top,#555,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#555555',endColorstr='#222222',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:2px;*padding-bottom:2px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-group{position:relative;*margin-left:.3em;*zoom:1}.btn-group:before,.btn-group:after{display:table;content:""}.btn-group:after{clear:both}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:9px;margin-bottom:9px}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1}.btn-group>.btn{position:relative;float:left;margin-left:-1px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.dropdown-toggle{*padding-top:4px;padding-right:8px;*padding-bottom:4px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini.dropdown-toggle{padding-right:5px;padding-left:5px}.btn-group>.btn-small.dropdown-toggle{*padding-top:4px;*padding-bottom:4px}.btn-group>.btn-large.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#05c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:7px;margin-left:0}.btn:hover .caret,.open.btn-group .caret{opacity:1;filter:alpha(opacity=100)}.btn-mini .caret{margin-top:5px}.btn-small .caret{margin-top:6px}.btn-large .caret{margin-top:6px;border-top-width:5px;border-right-width:5px;border-left-width:5px}.dropup .btn-large .caret{border-top:0;border-bottom:5px solid #000}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:.75;filter:alpha(opacity=75)}.alert{padding:8px 35px 8px 14px;margin-bottom:18px;color:#c09853;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert-heading{color:inherit}.alert .close{position:relative;top:-2px;right:-21px;line-height:18px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:18px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>.pull-right{float:right}.nav .nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:18px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:8px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:18px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.nav-tabs.nav-stacked>li>a:hover{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px}.nav-pills .dropdown-menu{-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-tabs .dropdown-toggle .caret,.nav-pills .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav-tabs .dropdown-toggle:hover .caret,.nav-pills .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .active .dropdown-toggle .caret,.nav-pills .active .dropdown-toggle .caret{border-top-color:#333;border-bottom-color:#333}.nav>.dropdown.active>a:hover{color:#000;cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.navbar{*position:relative;*z-index:2;margin-bottom:18px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#2c2c2c;background-image:-moz-linear-gradient(top,#333,#222);background-image:-ms-linear-gradient(top,#333,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#333),to(#222));background-image:-webkit-linear-gradient(top,#333,#222);background-image:-o-linear-gradient(top,#333,#222);background-image:linear-gradient(top,#333,#222);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#333333',endColorstr='#222222',GradientType=0);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.25),inset 0 -1px 0 rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.25),inset 0 -1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.25),inset 0 -1px 0 rgba(0,0,0,0.1)}.navbar .container{width:auto}.nav-collapse.collapse{height:auto}.navbar{color:#999}.navbar .brand:hover{text-decoration:none}.navbar .brand{display:block;float:left;padding:8px 20px 12px;margin-left:-20px;font-size:20px;font-weight:200;line-height:1;color:#999}.navbar .navbar-text{margin-bottom:0;line-height:40px}.navbar .navbar-link{color:#999}.navbar .navbar-link:hover{color:#fff}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn{margin:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:6px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:6px;margin-bottom:0}.navbar-search .search-query{padding:4px 9px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;color:#fff;background-color:#626262;border:1px solid #151515;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none;transition:none}.navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-search .search-query:focus,.navbar-search .search-query.focused{padding:5px 10px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-bottom{bottom:0}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right}.navbar .nav>li{display:block;float:left}.navbar .nav>li>a{float:none;padding:9px 10px 11px;line-height:19px;color:#999;text-decoration:none;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar .btn{display:inline-block;padding:4px 10px 4px;margin:5px 5px 6px;line-height:18px}.navbar .btn-group{padding:5px 5px 6px;margin:0}.navbar .nav>li>a:hover{color:#fff;text-decoration:none;background-color:transparent}.navbar .nav .active>a,.navbar .nav .active>a:hover{color:#fff;text-decoration:none;background-color:#222}.navbar .divider-vertical{width:1px;height:40px;margin:0 9px;overflow:hidden;background-color:#222;border-right:1px solid #333}.navbar .nav.pull-right{margin-right:0;margin-left:10px}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;background-color:#2c2c2c;*background-color:#222;background-image:-ms-linear-gradient(top,#333,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#333),to(#222));background-image:-webkit-linear-gradient(top,#333,#222);background-image:-o-linear-gradient(top,#333,#222);background-image:linear-gradient(top,#333,#222);background-image:-moz-linear-gradient(top,#333,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:dximagetransform.microsoft.gradient(startColorstr='#333333',endColorstr='#222222',GradientType=0);filter:progid:dximagetransform.microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{background-color:#222;*background-color:#151515}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#080808 \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown .dropdown-toggle .caret,.navbar .nav li.dropdown.open .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar .nav li.dropdown.active .caret{opacity:1;filter:alpha(opacity=100)}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{background-color:transparent}.navbar .nav li.dropdown.active>.dropdown-toggle:hover{color:#fff}.navbar .pull-right .dropdown-menu,.navbar .dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right .dropdown-menu:before,.navbar .dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right .dropdown-menu:after,.navbar .dropdown-menu.pull-right:after{right:13px;left:auto}.breadcrumb{padding:7px 14px;margin:0 0 18px;list-style:none;background-color:#fbfbfb;background-image:-moz-linear-gradient(top,#fff,#f5f5f5);background-image:-ms-linear-gradient(top,#fff,#f5f5f5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f5f5f5));background-image:-webkit-linear-gradient(top,#fff,#f5f5f5);background-image:-o-linear-gradient(top,#fff,#f5f5f5);background-image:linear-gradient(top,#fff,#f5f5f5);background-repeat:repeat-x;border:1px solid #ddd;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ffffff',endColorstr='#f5f5f5',GradientType=0);-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.breadcrumb li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb .divider{padding:0 5px;color:#999}.breadcrumb .active a{color:#333}.pagination{height:36px;margin:18px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination li{display:inline}.pagination a{float:left;padding:0 14px;line-height:34px;text-decoration:none;border:1px solid #ddd;border-left-width:0}.pagination a:hover,.pagination .active a{background-color:#f5f5f5}.pagination .active a{color:#999;cursor:default}.pagination .disabled span,.pagination .disabled a,.pagination .disabled a:hover{color:#999;cursor:default;background-color:transparent}.pagination li:first-child a{border-left-width:1px;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.pagination li:last-child a{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pager{margin-bottom:18px;margin-left:0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;content:""}.pager:after{clear:both}.pager li{display:inline}.pager a{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager a:hover{text-decoration:none;background-color:#f5f5f5}.pager .next a{float:right}.pager .previous a{float:left}.pager .disabled a,.pager .disabled a:hover{color:#999;cursor:default;background-color:#fff}.modal-open .dropdown-menu{z-index:2050}.modal-open .dropdown.open{*z-index:2050}.modal-open .popover{z-index:2060}.modal-open .tooltip{z-index:2070}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:50%;left:50%;z-index:1050;width:560px;margin:-250px 0 0 -280px;overflow:auto;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-ms-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:50%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-body{max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.tooltip{position:absolute;z-index:1020;display:block;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{margin-top:-2px}.tooltip.right{margin-left:2px}.tooltip.bottom{margin-top:2px}.tooltip.left{margin-left:-2px}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top:5px solid #000;border-right:5px solid transparent;border-left:5px solid transparent}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-right:5px solid transparent;border-bottom:5px solid #000;border-left:5px solid transparent}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-right:5px solid #000;border-bottom:5px solid transparent}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;padding:5px}.popover.top{margin-top:-5px}.popover.right{margin-left:5px}.popover.bottom{margin-top:5px}.popover.left{margin-left:-5px}.popover.top .arrow{bottom:0;left:50%;margin-left:-5px;border-top:5px solid #000;border-right:5px solid transparent;border-left:5px solid transparent}.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-right:5px solid #000;border-bottom:5px solid transparent}.popover.bottom .arrow{top:0;left:50%;margin-left:-5px;border-right:5px solid transparent;border-bottom:5px solid #000;border-left:5px solid transparent}.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000}.popover .arrow{position:absolute;width:0;height:0}.popover-inner{width:280px;padding:3px;overflow:hidden;background:#000;background:rgba(0,0,0,0.8);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3)}.popover-title{padding:9px 15px;line-height:1;background-color:#f5f5f5;border-bottom:1px solid #eee;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0}.popover-content{padding:14px;background-color:#fff;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.popover-content p,.popover-content ul,.popover-content ol{margin-bottom:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:18px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:1;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:0 1px 1px rgba(0,0,0,0.075);box-shadow:0 1px 1px rgba(0,0,0,0.075)}a.thumbnail:hover{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px}.label,.badge{font-size:10.998px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{padding:1px 4px 2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding:1px 9px 2px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}a.label:hover,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:18px;margin-bottom:18px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-ms-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(top,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#f5f5f5',endColorstr='#f9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{width:0;height:18px;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(top,#149bdf,#0480be);background-image:-ms-linear-gradient(top,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#149bdf',endColorstr='#0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-ms-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-striped .bar{background-color:#149bdf;background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-ms-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(top,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#ee5f5b',endColorstr='#c43c35',GradientType=0)}.progress-danger.progress-striped .bar{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-ms-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(top,#62c462,#57a957);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#62c462',endColorstr='#57a957',GradientType=0)}.progress-success.progress-striped .bar{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-ms-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(top,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#5bc0de',endColorstr='#339bb9',GradientType=0)}.progress-info.progress-striped .bar{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-ms-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(top,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:dximagetransform.microsoft.gradient(startColorstr='#fbb450',endColorstr='#f89406',GradientType=0)}.progress-warning.progress-striped .bar{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:18px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:18px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel .item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-ms-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel .item>img{display:block;line-height:1}.carousel .active,.carousel .next,.carousel .prev{display:block}.carousel .active{left:0}.carousel .next,.carousel .prev{position:absolute;top:0;width:100%}.carousel .next{left:100%}.carousel .prev{left:-100%}.carousel .next.left,.carousel .prev.right{left:0}.carousel .active.left{left:-100%}.carousel .active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:10px 15px 5px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{color:#fff}.hero-unit{padding:60px;margin-bottom:30px;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit p{font-size:18px;font-weight:200;line-height:27px;color:inherit}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}
diff --git a/gocart/themes/default/assets/css/styles.css b/gocart/themes/default/assets/css/styles.css
new file mode 100644
index 00000000..82364907
--- /dev/null
+++ b/gocart/themes/default/assets/css/styles.css
@@ -0,0 +1,112 @@
+body {
+ margin-top:60px;
+}
+
+@media (max-width: 979px) {
+ body {
+ margin-top:0px;
+ }
+}
+
+
+img.responsiveImage
+{
+ width: 100%;
+}
+
+.price-slash {
+ text-decoration:line-through;
+ font-size:.9em;
+ color:#999;
+}
+
+.price-sale {
+ font-weight:bold;
+ color:#ff753f;
+}
+
+.price-reg {
+ font-weight:bold;
+ color:#38586f;
+}
+
+.product-price {
+ color:#ffa800;
+}
+
+/* Footer
+-------------------------------------------------- */
+.footer {
+ margin-top: 45px;
+ padding: 35px 0 36px;
+ border-top: 1px solid #e5e5e5;
+}
+.footer p {
+ margin-bottom: 0;
+ color: #555;
+}
+
+/* Hide Related products from the responsive design */
+ @media (max-width: 767px) {
+ .desktop {
+ display:none;
+ }
+}
+
+@media (min-width: 767px) {
+ .mobile {
+ display:none;
+ }
+
+}
+
+.sku-pricing div{
+ color:#999;
+ text-transform:uppercase;
+ font-size:14px;
+}
+
+.out-of-stock div{
+ background-color:#eee;
+ font-family: 'Oswald', sans-serif;
+ color:#858585;
+ text-transform:uppercase;
+ text-align:center;
+ padding:12px 15px;
+ font-size:22px;
+ margin:0px 0px 0px 45px;
+}
+
+.product-cart-form
+{
+ background-color:#eee;
+ border:1px solid #ddd;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ padding:20px 0px 10px;
+}
+
+/* My Account */
+.address-box {
+ border:1px solid #eee;
+ background-color:#f2f2f2;
+ padding:5px 20px;
+ margin:5px 0px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.my-account-box {
+ border:1px solid #eee;
+ background-color:#f2f2f2;
+ padding:5px 20px;
+ margin:10px -20px 5px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.hide {
+ display:none;
+}
\ No newline at end of file
diff --git a/gocart/themes/default/assets/img/ajax-loader.gif b/gocart/themes/default/assets/img/ajax-loader.gif
new file mode 100644
index 00000000..ad9693c8
Binary files /dev/null and b/gocart/themes/default/assets/img/ajax-loader.gif differ
diff --git a/gocart/themes/default/assets/img/giftcard.jpg b/gocart/themes/default/assets/img/giftcard.jpg
new file mode 100644
index 00000000..bf6e73f0
Binary files /dev/null and b/gocart/themes/default/assets/img/giftcard.jpg differ
diff --git a/gocart/themes/default/assets/img/glyphicons-halflings-white.png b/gocart/themes/default/assets/img/glyphicons-halflings-white.png
new file mode 100644
index 00000000..3bf6484a
Binary files /dev/null and b/gocart/themes/default/assets/img/glyphicons-halflings-white.png differ
diff --git a/gocart/themes/default/assets/img/glyphicons-halflings.png b/gocart/themes/default/assets/img/glyphicons-halflings.png
new file mode 100644
index 00000000..79bc568c
Binary files /dev/null and b/gocart/themes/default/assets/img/glyphicons-halflings.png differ
diff --git a/images/nopicture.png b/gocart/themes/default/assets/img/no_picture.png
similarity index 100%
rename from images/nopicture.png
rename to gocart/themes/default/assets/img/no_picture.png
diff --git a/gocart/themes/default/assets/js/bootstrap.js b/gocart/themes/default/assets/js/bootstrap.js
new file mode 100644
index 00000000..5d6e65b8
--- /dev/null
+++ b/gocart/themes/default/assets/js/bootstrap.js
@@ -0,0 +1,1825 @@
+/* ===================================================
+ * bootstrap-transition.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#transitions
+ * ===================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+ $(function () {
+
+ "use strict"; // jshint ;_;
+
+
+ /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
+ * ======================================================= */
+
+ $.support.transition = (function () {
+
+ var transitionEnd = (function () {
+
+ var el = document.createElement('bootstrap')
+ , transEndEventNames = {
+ 'WebkitTransition' : 'webkitTransitionEnd'
+ , 'MozTransition' : 'transitionend'
+ , 'OTransition' : 'oTransitionEnd'
+ , 'msTransition' : 'MSTransitionEnd'
+ , 'transition' : 'transitionend'
+ }
+ , name
+
+ for (name in transEndEventNames){
+ if (el.style[name] !== undefined) {
+ return transEndEventNames[name]
+ }
+ }
+
+ }())
+
+ return transitionEnd && {
+ end: transitionEnd
+ }
+
+ })()
+
+ })
+
+}(window.jQuery);/* ==========================================================
+ * bootstrap-alert.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#alerts
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* ALERT CLASS DEFINITION
+ * ====================== */
+
+ var dismiss = '[data-dismiss="alert"]'
+ , Alert = function (el) {
+ $(el).on('click', dismiss, this.close)
+ }
+
+ Alert.prototype.close = function (e) {
+ var $this = $(this)
+ , selector = $this.attr('data-target')
+ , $parent
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ }
+
+ $parent = $(selector)
+
+ e && e.preventDefault()
+
+ $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
+
+ $parent.trigger(e = $.Event('close'))
+
+ if (e.isDefaultPrevented()) return
+
+ $parent.removeClass('in')
+
+ function removeElement() {
+ $parent
+ .trigger('closed')
+ .remove()
+ }
+
+ $.support.transition && $parent.hasClass('fade') ?
+ $parent.on($.support.transition.end, removeElement) :
+ removeElement()
+ }
+
+
+ /* ALERT PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.alert = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('alert')
+ if (!data) $this.data('alert', (data = new Alert(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ $.fn.alert.Constructor = Alert
+
+
+ /* ALERT DATA-API
+ * ============== */
+
+ $(function () {
+ $('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
+ })
+
+}(window.jQuery);/* ============================================================
+ * bootstrap-button.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#buttons
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* BUTTON PUBLIC CLASS DEFINITION
+ * ============================== */
+
+ var Button = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, $.fn.button.defaults, options)
+ }
+
+ Button.prototype.setState = function (state) {
+ var d = 'disabled'
+ , $el = this.$element
+ , data = $el.data()
+ , val = $el.is('input') ? 'val' : 'html'
+
+ state = state + 'Text'
+ data.resetText || $el.data('resetText', $el[val]())
+
+ $el[val](data[state] || this.options[state])
+
+ // push to event loop to allow forms to submit
+ setTimeout(function () {
+ state == 'loadingText' ?
+ $el.addClass(d).attr(d, d) :
+ $el.removeClass(d).removeAttr(d)
+ }, 0)
+ }
+
+ Button.prototype.toggle = function () {
+ var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
+
+ $parent && $parent
+ .find('.active')
+ .removeClass('active')
+
+ this.$element.toggleClass('active')
+ }
+
+
+ /* BUTTON PLUGIN DEFINITION
+ * ======================== */
+
+ $.fn.button = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('button')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('button', (data = new Button(this, options)))
+ if (option == 'toggle') data.toggle()
+ else if (option) data.setState(option)
+ })
+ }
+
+ $.fn.button.defaults = {
+ loadingText: 'loading...'
+ }
+
+ $.fn.button.Constructor = Button
+
+
+ /* BUTTON DATA-API
+ * =============== */
+
+ $(function () {
+ $('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
+ var $btn = $(e.target)
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+ $btn.button('toggle')
+ })
+ })
+
+}(window.jQuery);/* ==========================================================
+ * bootstrap-carousel.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#carousel
+ * ==========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* CAROUSEL CLASS DEFINITION
+ * ========================= */
+
+ var Carousel = function (element, options) {
+ this.$element = $(element)
+ this.options = options
+ this.options.slide && this.slide(this.options.slide)
+ this.options.pause == 'hover' && this.$element
+ .on('mouseenter', $.proxy(this.pause, this))
+ .on('mouseleave', $.proxy(this.cycle, this))
+ }
+
+ Carousel.prototype = {
+
+ cycle: function (e) {
+ if (!e) this.paused = false
+ this.options.interval
+ && !this.paused
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
+ return this
+ }
+
+ , to: function (pos) {
+ var $active = this.$element.find('.active')
+ , children = $active.parent().children()
+ , activePos = children.index($active)
+ , that = this
+
+ if (pos > (children.length - 1) || pos < 0) return
+
+ if (this.sliding) {
+ return this.$element.one('slid', function () {
+ that.to(pos)
+ })
+ }
+
+ if (activePos == pos) {
+ return this.pause().cycle()
+ }
+
+ return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
+ }
+
+ , pause: function (e) {
+ if (!e) this.paused = true
+ clearInterval(this.interval)
+ this.interval = null
+ return this
+ }
+
+ , next: function () {
+ if (this.sliding) return
+ return this.slide('next')
+ }
+
+ , prev: function () {
+ if (this.sliding) return
+ return this.slide('prev')
+ }
+
+ , slide: function (type, next) {
+ var $active = this.$element.find('.active')
+ , $next = next || $active[type]()
+ , isCycling = this.interval
+ , direction = type == 'next' ? 'left' : 'right'
+ , fallback = type == 'next' ? 'first' : 'last'
+ , that = this
+ , e = $.Event('slide')
+
+ this.sliding = true
+
+ isCycling && this.pause()
+
+ $next = $next.length ? $next : this.$element.find('.item')[fallback]()
+
+ if ($next.hasClass('active')) return
+
+ if ($.support.transition && this.$element.hasClass('slide')) {
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
+ $next.addClass(type)
+ $next[0].offsetWidth // force reflow
+ $active.addClass(direction)
+ $next.addClass(direction)
+ this.$element.one($.support.transition.end, function () {
+ $next.removeClass([type, direction].join(' ')).addClass('active')
+ $active.removeClass(['active', direction].join(' '))
+ that.sliding = false
+ setTimeout(function () { that.$element.trigger('slid') }, 0)
+ })
+ } else {
+ this.$element.trigger(e)
+ if (e.isDefaultPrevented()) return
+ $active.removeClass('active')
+ $next.addClass('active')
+ this.sliding = false
+ this.$element.trigger('slid')
+ }
+
+ isCycling && this.cycle()
+
+ return this
+ }
+
+ }
+
+
+ /* CAROUSEL PLUGIN DEFINITION
+ * ========================== */
+
+ $.fn.carousel = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('carousel')
+ , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
+ if (!data) $this.data('carousel', (data = new Carousel(this, options)))
+ if (typeof option == 'number') data.to(option)
+ else if (typeof option == 'string' || (option = options.slide)) data[option]()
+ else if (options.interval) data.cycle()
+ })
+ }
+
+ $.fn.carousel.defaults = {
+ interval: 5000
+ , pause: 'hover'
+ }
+
+ $.fn.carousel.Constructor = Carousel
+
+
+ /* CAROUSEL DATA-API
+ * ================= */
+
+ $(function () {
+ $('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
+ var $this = $(this), href
+ , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+ , options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
+ $target.carousel(options)
+ e.preventDefault()
+ })
+ })
+
+}(window.jQuery);/* =============================================================
+ * bootstrap-collapse.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#collapse
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* COLLAPSE PUBLIC CLASS DEFINITION
+ * ================================ */
+
+ var Collapse = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, $.fn.collapse.defaults, options)
+
+ if (this.options.parent) {
+ this.$parent = $(this.options.parent)
+ }
+
+ this.options.toggle && this.toggle()
+ }
+
+ Collapse.prototype = {
+
+ constructor: Collapse
+
+ , dimension: function () {
+ var hasWidth = this.$element.hasClass('width')
+ return hasWidth ? 'width' : 'height'
+ }
+
+ , show: function () {
+ var dimension
+ , scroll
+ , actives
+ , hasData
+
+ if (this.transitioning) return
+
+ dimension = this.dimension()
+ scroll = $.camelCase(['scroll', dimension].join('-'))
+ actives = this.$parent && this.$parent.find('> .accordion-group > .in')
+
+ if (actives && actives.length) {
+ hasData = actives.data('collapse')
+ if (hasData && hasData.transitioning) return
+ actives.collapse('hide')
+ hasData || actives.data('collapse', null)
+ }
+
+ this.$element[dimension](0)
+ this.transition('addClass', $.Event('show'), 'shown')
+ this.$element[dimension](this.$element[0][scroll])
+ }
+
+ , hide: function () {
+ var dimension
+ if (this.transitioning) return
+ dimension = this.dimension()
+ this.reset(this.$element[dimension]())
+ this.transition('removeClass', $.Event('hide'), 'hidden')
+ this.$element[dimension](0)
+ }
+
+ , reset: function (size) {
+ var dimension = this.dimension()
+
+ this.$element
+ .removeClass('collapse')
+ [dimension](size || 'auto')
+ [0].offsetWidth
+
+ this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
+
+ return this
+ }
+
+ , transition: function (method, startEvent, completeEvent) {
+ var that = this
+ , complete = function () {
+ if (startEvent.type == 'show') that.reset()
+ that.transitioning = 0
+ that.$element.trigger(completeEvent)
+ }
+
+ this.$element.trigger(startEvent)
+
+ if (startEvent.isDefaultPrevented()) return
+
+ this.transitioning = 1
+
+ this.$element[method]('in')
+
+ $.support.transition && this.$element.hasClass('collapse') ?
+ this.$element.one($.support.transition.end, complete) :
+ complete()
+ }
+
+ , toggle: function () {
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
+ }
+
+ }
+
+
+ /* COLLAPSIBLE PLUGIN DEFINITION
+ * ============================== */
+
+ $.fn.collapse = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('collapse')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('collapse', (data = new Collapse(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.collapse.defaults = {
+ toggle: true
+ }
+
+ $.fn.collapse.Constructor = Collapse
+
+
+ /* COLLAPSIBLE DATA-API
+ * ==================== */
+
+ $(function () {
+ $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
+ var $this = $(this), href
+ , target = $this.attr('data-target')
+ || e.preventDefault()
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
+ , option = $(target).data('collapse') ? 'toggle' : $this.data()
+ $(target).collapse(option)
+ })
+ })
+
+}(window.jQuery);/* ============================================================
+ * bootstrap-dropdown.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#dropdowns
+ * ============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* DROPDOWN CLASS DEFINITION
+ * ========================= */
+
+ var toggle = '[data-toggle="dropdown"]'
+ , Dropdown = function (element) {
+ var $el = $(element).on('click.dropdown.data-api', this.toggle)
+ $('html').on('click.dropdown.data-api', function () {
+ $el.parent().removeClass('open')
+ })
+ }
+
+ Dropdown.prototype = {
+
+ constructor: Dropdown
+
+ , toggle: function (e) {
+ var $this = $(this)
+ , $parent
+ , selector
+ , isActive
+
+ if ($this.is('.disabled, :disabled')) return
+
+ selector = $this.attr('data-target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ }
+
+ $parent = $(selector)
+ $parent.length || ($parent = $this.parent())
+
+ isActive = $parent.hasClass('open')
+
+ clearMenus()
+
+ if (!isActive) $parent.toggleClass('open')
+
+ return false
+ }
+
+ }
+
+ function clearMenus() {
+ $(toggle).parent().removeClass('open')
+ }
+
+
+ /* DROPDOWN PLUGIN DEFINITION
+ * ========================== */
+
+ $.fn.dropdown = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('dropdown')
+ if (!data) $this.data('dropdown', (data = new Dropdown(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ $.fn.dropdown.Constructor = Dropdown
+
+
+ /* APPLY TO STANDARD DROPDOWN ELEMENTS
+ * =================================== */
+
+ $(function () {
+ $('html').on('click.dropdown.data-api', clearMenus)
+ $('body')
+ .on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
+ .on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
+ })
+
+}(window.jQuery);/* =========================================================
+ * bootstrap-modal.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#modals
+ * =========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================= */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* MODAL CLASS DEFINITION
+ * ====================== */
+
+ var Modal = function (content, options) {
+ this.options = options
+ this.$element = $(content)
+ .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
+ }
+
+ Modal.prototype = {
+
+ constructor: Modal
+
+ , toggle: function () {
+ return this[!this.isShown ? 'show' : 'hide']()
+ }
+
+ , show: function () {
+ var that = this
+ , e = $.Event('show')
+
+ this.$element.trigger(e)
+
+ if (this.isShown || e.isDefaultPrevented()) return
+
+ $('body').addClass('modal-open')
+
+ this.isShown = true
+
+ escape.call(this)
+ backdrop.call(this, function () {
+ var transition = $.support.transition && that.$element.hasClass('fade')
+
+ if (!that.$element.parent().length) {
+ that.$element.appendTo(document.body) //don't move modals dom position
+ }
+
+ that.$element
+ .show()
+
+ if (transition) {
+ that.$element[0].offsetWidth // force reflow
+ }
+
+ that.$element.addClass('in')
+
+ transition ?
+ that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
+ that.$element.trigger('shown')
+
+ })
+ }
+
+ , hide: function (e) {
+ e && e.preventDefault()
+
+ var that = this
+
+ e = $.Event('hide')
+
+ this.$element.trigger(e)
+
+ if (!this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = false
+
+ $('body').removeClass('modal-open')
+
+ escape.call(this)
+
+ this.$element.removeClass('in')
+
+ $.support.transition && this.$element.hasClass('fade') ?
+ hideWithTransition.call(this) :
+ hideModal.call(this)
+ }
+
+ }
+
+
+ /* MODAL PRIVATE METHODS
+ * ===================== */
+
+ function hideWithTransition() {
+ var that = this
+ , timeout = setTimeout(function () {
+ that.$element.off($.support.transition.end)
+ hideModal.call(that)
+ }, 500)
+
+ this.$element.one($.support.transition.end, function () {
+ clearTimeout(timeout)
+ hideModal.call(that)
+ })
+ }
+
+ function hideModal(that) {
+ this.$element
+ .hide()
+ .trigger('hidden')
+
+ backdrop.call(this)
+ }
+
+ function backdrop(callback) {
+ var that = this
+ , animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+ if (this.isShown && this.options.backdrop) {
+ var doAnimate = $.support.transition && animate
+
+ this.$backdrop = $('')
+ .appendTo(document.body)
+
+ if (this.options.backdrop != 'static') {
+ this.$backdrop.click($.proxy(this.hide, this))
+ }
+
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+ this.$backdrop.addClass('in')
+
+ doAnimate ?
+ this.$backdrop.one($.support.transition.end, callback) :
+ callback()
+
+ } else if (!this.isShown && this.$backdrop) {
+ this.$backdrop.removeClass('in')
+
+ $.support.transition && this.$element.hasClass('fade')?
+ this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
+ removeBackdrop.call(this)
+
+ } else if (callback) {
+ callback()
+ }
+ }
+
+ function removeBackdrop() {
+ this.$backdrop.remove()
+ this.$backdrop = null
+ }
+
+ function escape() {
+ var that = this
+ if (this.isShown && this.options.keyboard) {
+ $(document).on('keyup.dismiss.modal', function ( e ) {
+ e.which == 27 && that.hide()
+ })
+ } else if (!this.isShown) {
+ $(document).off('keyup.dismiss.modal')
+ }
+ }
+
+
+ /* MODAL PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.modal = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('modal')
+ , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
+ if (!data) $this.data('modal', (data = new Modal(this, options)))
+ if (typeof option == 'string') data[option]()
+ else if (options.show) data.show()
+ })
+ }
+
+ $.fn.modal.defaults = {
+ backdrop: true
+ , keyboard: true
+ , show: true
+ }
+
+ $.fn.modal.Constructor = Modal
+
+
+ /* MODAL DATA-API
+ * ============== */
+
+ $(function () {
+ $('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
+ var $this = $(this), href
+ , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+ , option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data())
+
+ e.preventDefault()
+ $target.modal(option)
+ })
+ })
+
+}(window.jQuery);/* ===========================================================
+ * bootstrap-tooltip.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#tooltips
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ===========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ========================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* TOOLTIP PUBLIC CLASS DEFINITION
+ * =============================== */
+
+ var Tooltip = function (element, options) {
+ this.init('tooltip', element, options)
+ }
+
+ Tooltip.prototype = {
+
+ constructor: Tooltip
+
+ , init: function (type, element, options) {
+ var eventIn
+ , eventOut
+
+ this.type = type
+ this.$element = $(element)
+ this.options = this.getOptions(options)
+ this.enabled = true
+
+ if (this.options.trigger != 'manual') {
+ eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
+ eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
+ this.$element.on(eventIn, this.options.selector, $.proxy(this.enter, this))
+ this.$element.on(eventOut, this.options.selector, $.proxy(this.leave, this))
+ }
+
+ this.options.selector ?
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+ this.fixTitle()
+ }
+
+ , getOptions: function (options) {
+ options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
+
+ if (options.delay && typeof options.delay == 'number') {
+ options.delay = {
+ show: options.delay
+ , hide: options.delay
+ }
+ }
+
+ return options
+ }
+
+ , enter: function (e) {
+ var self = $(e.currentTarget)[this.type](this._options).data(this.type)
+
+ if (!self.options.delay || !self.options.delay.show) return self.show()
+
+ clearTimeout(this.timeout)
+ self.hoverState = 'in'
+ this.timeout = setTimeout(function() {
+ if (self.hoverState == 'in') self.show()
+ }, self.options.delay.show)
+ }
+
+ , leave: function (e) {
+ var self = $(e.currentTarget)[this.type](this._options).data(this.type)
+
+ if (this.timeout) clearTimeout(this.timeout)
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+ self.hoverState = 'out'
+ this.timeout = setTimeout(function() {
+ if (self.hoverState == 'out') self.hide()
+ }, self.options.delay.hide)
+ }
+
+ , show: function () {
+ var $tip
+ , inside
+ , pos
+ , actualWidth
+ , actualHeight
+ , placement
+ , tp
+
+ if (this.hasContent() && this.enabled) {
+ $tip = this.tip()
+ this.setContent()
+
+ if (this.options.animation) {
+ $tip.addClass('fade')
+ }
+
+ placement = typeof this.options.placement == 'function' ?
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
+ this.options.placement
+
+ inside = /in/.test(placement)
+
+ $tip
+ .remove()
+ .css({ top: 0, left: 0, display: 'block' })
+ .appendTo(inside ? this.$element : document.body)
+
+ pos = this.getPosition(inside)
+
+ actualWidth = $tip[0].offsetWidth
+ actualHeight = $tip[0].offsetHeight
+
+ switch (inside ? placement.split(' ')[1] : placement) {
+ case 'bottom':
+ tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
+ break
+ case 'top':
+ tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
+ break
+ case 'left':
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
+ break
+ case 'right':
+ tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
+ break
+ }
+
+ $tip
+ .css(tp)
+ .addClass(placement)
+ .addClass('in')
+ }
+ }
+
+ , isHTML: function(text) {
+ // html string detection logic adapted from jQuery
+ return typeof text != 'string'
+ || ( text.charAt(0) === "<"
+ && text.charAt( text.length - 1 ) === ">"
+ && text.length >= 3
+ ) || /^(?:[^<]*<[\w\W]+>[^>]*$)/.exec(text)
+ }
+
+ , setContent: function () {
+ var $tip = this.tip()
+ , title = this.getTitle()
+
+ $tip.find('.tooltip-inner')[this.isHTML(title) ? 'html' : 'text'](title)
+ $tip.removeClass('fade in top bottom left right')
+ }
+
+ , hide: function () {
+ var that = this
+ , $tip = this.tip()
+
+ $tip.removeClass('in')
+
+ function removeWithAnimation() {
+ var timeout = setTimeout(function () {
+ $tip.off($.support.transition.end).remove()
+ }, 500)
+
+ $tip.one($.support.transition.end, function () {
+ clearTimeout(timeout)
+ $tip.remove()
+ })
+ }
+
+ $.support.transition && this.$tip.hasClass('fade') ?
+ removeWithAnimation() :
+ $tip.remove()
+ }
+
+ , fixTitle: function () {
+ var $e = this.$element
+ if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
+ $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
+ }
+ }
+
+ , hasContent: function () {
+ return this.getTitle()
+ }
+
+ , getPosition: function (inside) {
+ return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
+ width: this.$element[0].offsetWidth
+ , height: this.$element[0].offsetHeight
+ })
+ }
+
+ , getTitle: function () {
+ var title
+ , $e = this.$element
+ , o = this.options
+
+ title = $e.attr('data-original-title')
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
+
+ return title
+ }
+
+ , tip: function () {
+ return this.$tip = this.$tip || $(this.options.template)
+ }
+
+ , validate: function () {
+ if (!this.$element[0].parentNode) {
+ this.hide()
+ this.$element = null
+ this.options = null
+ }
+ }
+
+ , enable: function () {
+ this.enabled = true
+ }
+
+ , disable: function () {
+ this.enabled = false
+ }
+
+ , toggleEnabled: function () {
+ this.enabled = !this.enabled
+ }
+
+ , toggle: function () {
+ this[this.tip().hasClass('in') ? 'hide' : 'show']()
+ }
+
+ }
+
+
+ /* TOOLTIP PLUGIN DEFINITION
+ * ========================= */
+
+ $.fn.tooltip = function ( option ) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('tooltip')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.tooltip.Constructor = Tooltip
+
+ $.fn.tooltip.defaults = {
+ animation: true
+ , placement: 'top'
+ , selector: false
+ , template: ''
+ , trigger: 'hover'
+ , title: ''
+ , delay: 0
+ }
+
+}(window.jQuery);
+/* ===========================================================
+ * bootstrap-popover.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#popovers
+ * ===========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * =========================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* POPOVER PUBLIC CLASS DEFINITION
+ * =============================== */
+
+ var Popover = function ( element, options ) {
+ this.init('popover', element, options)
+ }
+
+
+ /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
+ ========================================== */
+
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
+
+ constructor: Popover
+
+ , setContent: function () {
+ var $tip = this.tip()
+ , title = this.getTitle()
+ , content = this.getContent()
+
+ $tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
+ $tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)
+
+ $tip.removeClass('fade top bottom left right in')
+ }
+
+ , hasContent: function () {
+ return this.getTitle() || this.getContent()
+ }
+
+ , getContent: function () {
+ var content
+ , $e = this.$element
+ , o = this.options
+
+ content = $e.attr('data-content')
+ || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
+
+ return content
+ }
+
+ , tip: function () {
+ if (!this.$tip) {
+ this.$tip = $(this.options.template)
+ }
+ return this.$tip
+ }
+
+ })
+
+
+ /* POPOVER PLUGIN DEFINITION
+ * ======================= */
+
+ $.fn.popover = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('popover')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('popover', (data = new Popover(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.popover.Constructor = Popover
+
+ $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
+ placement: 'right'
+ , content: ''
+ , template: ''
+ })
+
+}(window.jQuery);/* =============================================================
+ * bootstrap-scrollspy.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#scrollspy
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* SCROLLSPY CLASS DEFINITION
+ * ========================== */
+
+ function ScrollSpy( element, options) {
+ var process = $.proxy(this.process, this)
+ , $element = $(element).is('body') ? $(window) : $(element)
+ , href
+ this.options = $.extend({}, $.fn.scrollspy.defaults, options)
+ this.$scrollElement = $element.on('scroll.scroll.data-api', process)
+ this.selector = (this.options.target
+ || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
+ || '') + ' .nav li > a'
+ this.$body = $('body')
+ this.refresh()
+ this.process()
+ }
+
+ ScrollSpy.prototype = {
+
+ constructor: ScrollSpy
+
+ , refresh: function () {
+ var self = this
+ , $targets
+
+ this.offsets = $([])
+ this.targets = $([])
+
+ $targets = this.$body
+ .find(this.selector)
+ .map(function () {
+ var $el = $(this)
+ , href = $el.data('target') || $el.attr('href')
+ , $href = /^#\w/.test(href) && $(href)
+ return ( $href
+ && href.length
+ && [[ $href.position().top, href ]] ) || null
+ })
+ .sort(function (a, b) { return a[0] - b[0] })
+ .each(function () {
+ self.offsets.push(this[0])
+ self.targets.push(this[1])
+ })
+ }
+
+ , process: function () {
+ var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
+ , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
+ , maxScroll = scrollHeight - this.$scrollElement.height()
+ , offsets = this.offsets
+ , targets = this.targets
+ , activeTarget = this.activeTarget
+ , i
+
+ if (scrollTop >= maxScroll) {
+ return activeTarget != (i = targets.last()[0])
+ && this.activate ( i )
+ }
+
+ for (i = offsets.length; i--;) {
+ activeTarget != targets[i]
+ && scrollTop >= offsets[i]
+ && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
+ && this.activate( targets[i] )
+ }
+ }
+
+ , activate: function (target) {
+ var active
+ , selector
+
+ this.activeTarget = target
+
+ $(this.selector)
+ .parent('.active')
+ .removeClass('active')
+
+ selector = this.selector
+ + '[data-target="' + target + '"],'
+ + this.selector + '[href="' + target + '"]'
+
+ active = $(selector)
+ .parent('li')
+ .addClass('active')
+
+ if (active.parent('.dropdown-menu')) {
+ active = active.closest('li.dropdown').addClass('active')
+ }
+
+ active.trigger('activate')
+ }
+
+ }
+
+
+ /* SCROLLSPY PLUGIN DEFINITION
+ * =========================== */
+
+ $.fn.scrollspy = function ( option ) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('scrollspy')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.scrollspy.Constructor = ScrollSpy
+
+ $.fn.scrollspy.defaults = {
+ offset: 10
+ }
+
+
+ /* SCROLLSPY DATA-API
+ * ================== */
+
+ $(function () {
+ $('[data-spy="scroll"]').each(function () {
+ var $spy = $(this)
+ $spy.scrollspy($spy.data())
+ })
+ })
+
+}(window.jQuery);/* ========================================================
+ * bootstrap-tab.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#tabs
+ * ========================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ======================================================== */
+
+
+!function ($) {
+
+ "use strict"; // jshint ;_;
+
+
+ /* TAB CLASS DEFINITION
+ * ==================== */
+
+ var Tab = function ( element ) {
+ this.element = $(element)
+ }
+
+ Tab.prototype = {
+
+ constructor: Tab
+
+ , show: function () {
+ var $this = this.element
+ , $ul = $this.closest('ul:not(.dropdown-menu)')
+ , selector = $this.attr('data-target')
+ , previous
+ , $target
+ , e
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
+ }
+
+ if ( $this.parent('li').hasClass('active') ) return
+
+ previous = $ul.find('.active a').last()[0]
+
+ e = $.Event('show', {
+ relatedTarget: previous
+ })
+
+ $this.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ $target = $(selector)
+
+ this.activate($this.parent('li'), $ul)
+ this.activate($target, $target.parent(), function () {
+ $this.trigger({
+ type: 'shown'
+ , relatedTarget: previous
+ })
+ })
+ }
+
+ , activate: function ( element, container, callback) {
+ var $active = container.find('> .active')
+ , transition = callback
+ && $.support.transition
+ && $active.hasClass('fade')
+
+ function next() {
+ $active
+ .removeClass('active')
+ .find('> .dropdown-menu > .active')
+ .removeClass('active')
+
+ element.addClass('active')
+
+ if (transition) {
+ element[0].offsetWidth // reflow for transition
+ element.addClass('in')
+ } else {
+ element.removeClass('fade')
+ }
+
+ if ( element.parent('.dropdown-menu') ) {
+ element.closest('li.dropdown').addClass('active')
+ }
+
+ callback && callback()
+ }
+
+ transition ?
+ $active.one($.support.transition.end, next) :
+ next()
+
+ $active.removeClass('in')
+ }
+ }
+
+
+ /* TAB PLUGIN DEFINITION
+ * ===================== */
+
+ $.fn.tab = function ( option ) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('tab')
+ if (!data) $this.data('tab', (data = new Tab(this)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.tab.Constructor = Tab
+
+
+ /* TAB DATA-API
+ * ============ */
+
+ $(function () {
+ $('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
+ e.preventDefault()
+ $(this).tab('show')
+ })
+ })
+
+}(window.jQuery);/* =============================================================
+ * bootstrap-typeahead.js v2.0.4
+ * http://twitter.github.com/bootstrap/javascript.html#typeahead
+ * =============================================================
+ * Copyright 2012 Twitter, Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============================================================ */
+
+
+!function($){
+
+ "use strict"; // jshint ;_;
+
+
+ /* TYPEAHEAD PUBLIC CLASS DEFINITION
+ * ================================= */
+
+ var Typeahead = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, $.fn.typeahead.defaults, options)
+ this.matcher = this.options.matcher || this.matcher
+ this.sorter = this.options.sorter || this.sorter
+ this.highlighter = this.options.highlighter || this.highlighter
+ this.updater = this.options.updater || this.updater
+ this.$menu = $(this.options.menu).appendTo('body')
+ this.source = this.options.source
+ this.shown = false
+ this.listen()
+ }
+
+ Typeahead.prototype = {
+
+ constructor: Typeahead
+
+ , select: function () {
+ var val = this.$menu.find('.active').attr('data-value')
+ this.$element
+ .val(this.updater(val))
+ .change()
+ return this.hide()
+ }
+
+ , updater: function (item) {
+ return item
+ }
+
+ , show: function () {
+ var pos = $.extend({}, this.$element.offset(), {
+ height: this.$element[0].offsetHeight
+ })
+
+ this.$menu.css({
+ top: pos.top + pos.height
+ , left: pos.left
+ })
+
+ this.$menu.show()
+ this.shown = true
+ return this
+ }
+
+ , hide: function () {
+ this.$menu.hide()
+ this.shown = false
+ return this
+ }
+
+ , lookup: function (event) {
+ var that = this
+ , items
+ , q
+
+ this.query = this.$element.val()
+
+ if (!this.query) {
+ return this.shown ? this.hide() : this
+ }
+
+ items = $.grep(this.source, function (item) {
+ return that.matcher(item)
+ })
+
+ items = this.sorter(items)
+
+ if (!items.length) {
+ return this.shown ? this.hide() : this
+ }
+
+ return this.render(items.slice(0, this.options.items)).show()
+ }
+
+ , matcher: function (item) {
+ return ~item.toLowerCase().indexOf(this.query.toLowerCase())
+ }
+
+ , sorter: function (items) {
+ var beginswith = []
+ , caseSensitive = []
+ , caseInsensitive = []
+ , item
+
+ while (item = items.shift()) {
+ if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
+ else if (~item.indexOf(this.query)) caseSensitive.push(item)
+ else caseInsensitive.push(item)
+ }
+
+ return beginswith.concat(caseSensitive, caseInsensitive)
+ }
+
+ , highlighter: function (item) {
+ var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
+ return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
+ return '' + match + ''
+ })
+ }
+
+ , render: function (items) {
+ var that = this
+
+ items = $(items).map(function (i, item) {
+ i = $(that.options.item).attr('data-value', item)
+ i.find('a').html(that.highlighter(item))
+ return i[0]
+ })
+
+ items.first().addClass('active')
+ this.$menu.html(items)
+ return this
+ }
+
+ , next: function (event) {
+ var active = this.$menu.find('.active').removeClass('active')
+ , next = active.next()
+
+ if (!next.length) {
+ next = $(this.$menu.find('li')[0])
+ }
+
+ next.addClass('active')
+ }
+
+ , prev: function (event) {
+ var active = this.$menu.find('.active').removeClass('active')
+ , prev = active.prev()
+
+ if (!prev.length) {
+ prev = this.$menu.find('li').last()
+ }
+
+ prev.addClass('active')
+ }
+
+ , listen: function () {
+ this.$element
+ .on('blur', $.proxy(this.blur, this))
+ .on('keypress', $.proxy(this.keypress, this))
+ .on('keyup', $.proxy(this.keyup, this))
+
+ if ($.browser.webkit || $.browser.msie) {
+ this.$element.on('keydown', $.proxy(this.keypress, this))
+ }
+
+ this.$menu
+ .on('click', $.proxy(this.click, this))
+ .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
+ }
+
+ , keyup: function (e) {
+ switch(e.keyCode) {
+ case 40: // down arrow
+ case 38: // up arrow
+ break
+
+ case 9: // tab
+ case 13: // enter
+ if (!this.shown) return
+ this.select()
+ break
+
+ case 27: // escape
+ if (!this.shown) return
+ this.hide()
+ break
+
+ default:
+ this.lookup()
+ }
+
+ e.stopPropagation()
+ e.preventDefault()
+ }
+
+ , keypress: function (e) {
+ if (!this.shown) return
+
+ switch(e.keyCode) {
+ case 9: // tab
+ case 13: // enter
+ case 27: // escape
+ e.preventDefault()
+ break
+
+ case 38: // up arrow
+ if (e.type != 'keydown') break
+ e.preventDefault()
+ this.prev()
+ break
+
+ case 40: // down arrow
+ if (e.type != 'keydown') break
+ e.preventDefault()
+ this.next()
+ break
+ }
+
+ e.stopPropagation()
+ }
+
+ , blur: function (e) {
+ var that = this
+ setTimeout(function () { that.hide() }, 150)
+ }
+
+ , click: function (e) {
+ e.stopPropagation()
+ e.preventDefault()
+ this.select()
+ }
+
+ , mouseenter: function (e) {
+ this.$menu.find('.active').removeClass('active')
+ $(e.currentTarget).addClass('active')
+ }
+
+ }
+
+
+ /* TYPEAHEAD PLUGIN DEFINITION
+ * =========================== */
+
+ $.fn.typeahead = function (option) {
+ return this.each(function () {
+ var $this = $(this)
+ , data = $this.data('typeahead')
+ , options = typeof option == 'object' && option
+ if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ $.fn.typeahead.defaults = {
+ source: []
+ , items: 8
+ , menu: ''
+ , item: ' '
+ }
+
+ $.fn.typeahead.Constructor = Typeahead
+
+
+ /* TYPEAHEAD DATA-API
+ * ================== */
+
+ $(function () {
+ $('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
+ var $this = $(this)
+ if ($this.data('typeahead')) return
+ e.preventDefault()
+ $this.typeahead($this.data())
+ })
+ })
+
+}(window.jQuery);
\ No newline at end of file
diff --git a/gocart/themes/default/assets/js/bootstrap.min.js b/gocart/themes/default/assets/js/bootstrap.min.js
new file mode 100644
index 00000000..14356981
--- /dev/null
+++ b/gocart/themes/default/assets/js/bootstrap.min.js
@@ -0,0 +1,6 @@
+/*!
+* Bootstrap.js by @fat & @mdo
+* Copyright 2012 Twitter, Inc.
+* http://www.apache.org/licenses/LICENSE-2.0.txt
+*/
+!function(a){a(function(){"use strict",a.support.transition=function(){var a=function(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd",transition:"transitionend"},c;for(c in b)if(a.style[c]!==undefined)return b[c]}();return a&&{end:a}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function f(){e.trigger("closed").remove()}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger(b=a.Event("close"));if(b.isDefaultPrevented())return;e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=c,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(b){return b||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(a){return a||(this.paused=!0),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this,j=a.Event("slide");this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h]();if(e.hasClass("active"))return;if(a.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(j);if(j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})}else{this.$element.trigger(j);if(j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,typeof c=="object"&&c);e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():f.interval&&e.cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(this.transitioning)return;b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in");if(d&&d.length){e=d.data("collapse");if(e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),this.$element[b](this.$element[0][c])},hide:function(){var b;if(this.transitioning)return;b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0)},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[a!==null?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){c.type=="show"&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c);if(c.isDefaultPrevented())return;this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e,f,g;if(c.is(".disabled, :disabled"))return;return f=c.attr("data-target"),f||(f=c.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,"")),e=a(f),e.length||(e=c.parent()),g=e.hasClass("open"),d(),g||e.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown",".dropdown form",function(a){a.stopPropagation()}).on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,a.proxy(f,this)):f.call(this)):b&&b()}function f(){this.$backdrop.remove(),this.$backdrop=null}function g(){var b=this;this.isShown&&this.options.keyboard?a(document).on("keyup.dismiss.modal",function(a){a.which==27&&b.hide()}):this.isShown||a(document).off("keyup.dismiss.modal")}"use strict";var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this))};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this,c=a.Event("show");this.$element.trigger(c);if(this.isShown||c.isDefaultPrevented())return;a("body").addClass("modal-open"),this.isShown=!0,g.call(this),e.call(this,function(){var c=a.support.transition&&b.$element.hasClass("fade");b.$element.parent().length||b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in"),c?b.$element.one(a.support.transition.end,function(){b.$element.trigger("shown")}):b.$element.trigger("shown")})},hide:function(b){b&&b.preventDefault();var e=this;b=a.Event("hide"),this.$element.trigger(b);if(!this.isShown||b.isDefaultPrevented())return;this.isShown=!1,a("body").removeClass("modal-open"),g.call(this),this.$element.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?c.call(this):d.call(this)}},a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=a.extend({},a.fn.modal.defaults,d.data(),typeof c=="object"&&c);e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():f.show&&e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a(function(){a("body").on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({},e.data(),c.data());b.preventDefault(),e.modal(f)})})}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.options.trigger!="manual"&&(e=this.options.trigger=="hover"?"mouseenter":"focus",f=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(e,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);if(!c.options.delay||!c.options.delay.show)return c.show();clearTimeout(this.timeout),c.hoverState="in",this.timeout=setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show)},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!c.options.delay||!c.options.delay.hide)return c.hide();c.hoverState="out",this.timeout=setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},isHTML:function(a){return typeof a!="string"||a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3||/^(?:[^<]*<[\w\W]+>[^>]*$)/.exec(a)},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.isHTML(b)?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.remove()})}var b=this,c=this.tip();c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}},a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover",title:"",delay:0}}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.isHTML(b)?"html":"text"](b),a.find(".popover-content > *")[this.isHTML(c)?"html":"text"](c),a.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-content")||(typeof c.content=="function"?c.content.call(b[0]):c.content),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip}}),a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",content:"",template:''})}(window.jQuery),!function(a){function b(b,c){var d=a.proxy(this.process,this),e=a(b).is("body")?a(window):a(b),f;this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=e.on("scroll.scroll.data-api",d),this.selector=(this.options.target||(f=a(b).attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body"),this.refresh(),this.process()}"use strict",b.prototype={constructor:b,refresh:function(){var b=this,c;this.offsets=a([]),this.targets=a([]),c=this.$body.find(this.selector).map(function(){var b=a(this),c=b.data("target")||b.attr("href"),d=/^#\w/.test(c)&&a(c);return d&&c.length&&[[d.position().top,c]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,c=b-this.$scrollElement.height(),d=this.offsets,e=this.targets,f=this.activeTarget,g;if(a>=c)return f!=(g=e.last()[0])&&this.activate(g);for(g=d.length;g--;)f!=e[g]&&a>=d[g]&&(!d[g+1]||a<=d[g+1])&&this.activate(e[g])},activate:function(b){var c,d;this.activeTarget=b,a(this.selector).parent(".active").removeClass("active"),d=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',c=a(d).parent("li").addClass("active"),c.parent(".dropdown-menu")&&(c=c.closest("li.dropdown").addClass("active")),c.trigger("activate")}},a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a(function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f,g;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active a").last()[0],g=a.Event("show",{relatedTarget:e}),b.trigger(g);if(g.isDefaultPrevented())return;f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}},a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a(function(){a("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=a(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(a)).change(),this.hide()},updater:function(a){return a},show:function(){var b=a.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:b.top+b.height,left:b.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(b){var c=this,d,e;return this.query=this.$element.val(),this.query?(d=a.grep(this.source,function(a){return c.matcher(a)}),d=this.sorter(d),d.length?this.render(d.slice(0,this.options.items)).show():this.shown?this.hide():this):this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){var b=[],c=[],d=[],e;while(e=a.shift())e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?c.push(e):d.push(e):b.push(e);return b.concat(c,d)},highlighter:function(a){var b=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return a.replace(new RegExp("("+b+")","ig"),function(a,b){return""+b+""})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a(this.$menu.find("li")[0])),d.addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),(a.browser.webkit||a.browser.msie)&&this.$element.on("keydown",a.proxy(this.keypress,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this))},keyup:function(a){switch(a.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}a.stopPropagation(),a.preventDefault()},keypress:function(a){if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:if(a.type!="keydown")break;a.preventDefault(),this.prev();break;case 40:if(a.type!="keydown")break;a.preventDefault(),this.next()}a.stopPropagation()},blur:function(a){var b=this;setTimeout(function(){b.hide()},150)},click:function(a){a.stopPropagation(),a.preventDefault(),this.select()},mouseenter:function(b){this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")}},a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'',item:' '},a.fn.typeahead.Constructor=b,a(function(){a("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;b.preventDefault(),c.typeahead(c.data())})})}(window.jQuery);
\ No newline at end of file
diff --git a/js/jquery/equal_heights.js b/gocart/themes/default/assets/js/equal_heights.js
similarity index 100%
rename from js/jquery/equal_heights.js
rename to gocart/themes/default/assets/js/equal_heights.js
diff --git a/gocart/themes/default/assets/js/jquery.js b/gocart/themes/default/assets/js/jquery.js
new file mode 100644
index 00000000..3b8d15d0
--- /dev/null
+++ b/gocart/themes/default/assets/js/jquery.js
@@ -0,0 +1,2 @@
+/*! jQuery v@1.8.1 jquery.com | jquery.org/license */
+(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write(""),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bS[a]=c,c}function ci(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||ce.test(a)?d(a,e):ci(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ci(a+"["+e+"]",b[e],c,d);else d(a,b)}function cz(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.1",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;ba",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.length,e=c.shift(),f=p._queueHooks(a,b),g=function(){p.dequeue(a,b)};e==="inprogress"&&(e=c.shift(),d--),e&&(b==="fx"&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j=0),h[l]&&j.push(k);j.length&&t.push({elem:f,matches:j})}n.length>o&&t.push({elem:this,matches:n.slice(o)});for(d=0;d0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function $(a,b,c,d){c=c||[],b=b||q;var e,f,g,j,k=b.nodeType;if(k!==1&&k!==9)return[];if(!a||typeof a!="string")return c;g=h(b);if(!g&&!d)if(e=L.exec(a))if(j=e[1]){if(k===9){f=b.getElementById(j);if(!f||!f.parentNode)return c;if(f.id===j)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(j))&&i(b,f)&&f.id===j)return c.push(f),c}else{if(e[2])return u.apply(c,t.call(b.getElementsByTagName(a),0)),c;if((j=e[3])&&X&&b.getElementsByClassName)return u.apply(c,t.call(b.getElementsByClassName(j),0)),c}return bk(a,b,c,d,g)}function _(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function ba(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function bb(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}function bc(a,b,c,d){var e,g,h,i,j,k,l,m,n,p,r=!c&&b!==q,s=(r?"":"")+a.replace(H,"$1"),u=y[o][s];if(u)return d?0:t.call(u,0);j=a,k=[],m=0,n=f.preFilter,p=f.filter;while(j){if(!e||(g=I.exec(j)))g&&(j=j.slice(g[0].length),h.selector=l),k.push(h=[]),l="",r&&(j=" "+j);e=!1;if(g=J.exec(j))l+=g[0],j=j.slice(g[0].length),e=h.push({part:g.pop().replace(H," "),string:g[0],captures:g});for(i in p)(g=S[i].exec(j))&&(!n[i]||(g=n[i](g,b,c)))&&(l+=g[0],j=j.slice(g[0].length),e=h.push({part:i,string:g.shift(),captures:g}));if(!e)break}return l&&(h.selector=l),d?j.length:j?$.error(a):t.call(y(s,k),0)}function bd(a,b,e,f){var g=b.dir,h=s++;return a||(a=function(a){return a===e}),b.first?function(b){while(b=b[g])if(b.nodeType===1)return a(b)&&b}:f?function(b){while(b=b[g])if(b.nodeType===1&&a(b))return b}:function(b){var e,f=h+"."+c,i=f+"."+d;while(b=b[g])if(b.nodeType===1){if((e=b[o])===i)return b.sizset;if(typeof e=="string"&&e.indexOf(f)===0){if(b.sizset)return b}else{b[o]=i;if(a(b))return b.sizset=!0,b;b.sizset=!1}}}}function be(a,b){return a?function(c){var d=b(c);return d&&a(d===!0?c:d)}:b}function bf(a,b,c){var d,e,g=0;for(;d=a[g];g++)f.relative[d.part]?e=bd(e,f.relative[d.part],b,c):e=be(e,f.filter[d.part].apply(null,d.captures.concat(b,c)));return e}function bg(a){return function(b){var c,d=0;for(;c=a[d];d++)if(c(b))return!0;return!1}}function bh(a,b,c,d){var e=0,f=b.length;for(;e0?i(h,c,g):[]}function bj(a,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q,r,s=0,t=a.length,v=S.POS,w=new RegExp("^"+v.source+"(?!"+A+")","i"),x=function(){var a=1,c=arguments.length-2;for(;al){g+=k.slice(l,n.index),l=p,q=[c],J.test(g)&&(m&&(q=m),m=e);if(r=O.test(g))g=g.slice(0,-5).replace(J,"$&*"),l++;n.length>1&&n[0].replace(w,x),m=bi(g,n[1],n[2],q,m,r)}g=""}}o||(g+=k),o=!1}g?J.test(g)?bh(g,m||[c],d,e):$(g,c,d,e?e.concat(m):m):u.apply(d,m)}return t===1?d:$.uniqueSort(d)}function bk(a,b,e,g,h){a=a.replace(H,"$1");var i,k,l,m,n,o,p,q,r,s,v=bc(a,b,h),w=b.nodeType;if(S.POS.test(a))return bj(v,b,e,g);if(g)i=t.call(g,0);else if(v.length===1){if((o=t.call(v[0],0)).length>2&&(p=o[0]).part==="ID"&&w===9&&!h&&f.relative[o[1].part]){b=f.find.ID(p.captures[0].replace(R,""),b,h)[0];if(!b)return e;a=a.slice(o.shift().string.length)}r=(v=N.exec(o[0].string))&&!v.index&&b.parentNode||b,q="";for(n=o.length-1;n>=0;n--){p=o[n],s=p.part,q=p.string+q;if(f.relative[s])break;if(f.order.test(s)){i=f.find[s](p.captures[0].replace(R,""),r,h);if(i==null)continue;a=a.slice(0,a.length-q.length)+q.replace(S[s],""),a||u.apply(e,t.call(i,0));break}}}if(a){k=j(a,b,h),c=k.dirruns++,i==null&&(i=f.find.TAG("*",N.test(a)&&b.parentNode||b));for(n=0;m=i[n];n++)d=k.runs++,k(m)&&e.push(m)}return e}var c,d,e,f,g,h,i,j,k,l,m=!0,n="undefined",o=("sizcache"+Math.random()).replace(".",""),q=a.document,r=q.documentElement,s=0,t=[].slice,u=[].push,v=function(a,b){return a[o]=b||!0,a},w=function(){var a={},b=[];return v(function(c,d){return b.push(c)>f.cacheLength&&delete a[b.shift()],a[c]=d},a)},x=w(),y=w(),z=w(),A="[\\x20\\t\\r\\n\\f]",B="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",C=B.replace("w","w#"),D="([*^$|!~]?=)",E="\\["+A+"*("+B+")"+A+"*(?:"+D+A+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+C+")|)|)"+A+"*\\]",F=":("+B+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+E+")|[^:]|\\\\.)*|.*))\\)|)",G=":(nth|eq|gt|lt|first|last|even|odd)(?:\\(((?:-\\d)?\\d*)\\)|)(?=[^-]|$)",H=new RegExp("^"+A+"+|((?:^|[^\\\\])(?:\\\\.)*)"+A+"+$","g"),I=new RegExp("^"+A+"*,"+A+"*"),J=new RegExp("^"+A+"*([\\x20\\t\\r\\n\\f>+~])"+A+"*"),K=new RegExp(F),L=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,M=/^:not/,N=/[\x20\t\r\n\f]*[+~]/,O=/:not\($/,P=/h\d/i,Q=/input|select|textarea|button/i,R=/\\(?!\\)/g,S={ID:new RegExp("^#("+B+")"),CLASS:new RegExp("^\\.("+B+")"),NAME:new RegExp("^\\[name=['\"]?("+B+")['\"]?\\]"),TAG:new RegExp("^("+B.replace("w","w*")+")"),ATTR:new RegExp("^"+E),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+A+"*(even|odd|(([+-]|)(\\d*)n|)"+A+"*(?:([+-]|)"+A+"*(\\d+)|))"+A+"*\\)|)","i"),POS:new RegExp(G,"ig"),needsContext:new RegExp("^"+A+"*[>+~]|"+G,"i")},T=function(a){var b=q.createElement("div");try{return a(b)}catch(c){return!1}finally{b=null}},U=T(function(a){return a.appendChild(q.createComment("")),!a.getElementsByTagName("*").length}),V=T(function(a){return a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!==n&&a.firstChild.getAttribute("href")==="#"}),W=T(function(a){a.innerHTML="";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),X=T(function(a){return a.innerHTML="",!a.getElementsByClassName||!a.getElementsByClassName("e").length?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length===2)}),Y=T(function(a){a.id=o+0,a.innerHTML="",r.insertBefore(a,r.firstChild);var b=q.getElementsByName&&q.getElementsByName(o).length===2+q.getElementsByName(o+0).length;return e=!q.getElementById(o),r.removeChild(a),b});try{t.call(r.childNodes,0)[0].nodeType}catch(Z){t=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}$.matches=function(a,b){return $(a,null,null,b)},$.matchesSelector=function(a,b){return $(b,null,null,[a]).length>0},g=$.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=g(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=g(b);return c},h=$.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},i=$.contains=r.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:r.compareDocumentPosition?function(a,b){return b&&!!(a.compareDocumentPosition(b)&16)}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},$.attr=function(a,b){var c,d=h(a);return d||(b=b.toLowerCase()),f.attrHandle[b]?f.attrHandle[b](a):W||d?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},f=$.selectors={cacheLength:50,createPseudo:v,match:S,order:new RegExp("ID|TAG"+(Y?"|NAME":"")+(X?"|CLASS":"")),attrHandle:V?{}:{href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}},find:{ID:e?function(a,b,c){if(typeof b.getElementById!==n&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==n&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==n&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:U?function(a,b){if(typeof b.getElementsByTagName!==n)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c},NAME:function(a,b){if(typeof b.getElementsByName!==n)return b.getElementsByName(name)},CLASS:function(a,b,c){if(typeof b.getElementsByClassName!==n&&!c)return b.getElementsByClassName(a)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(R,""),a[3]=(a[4]||a[5]||"").replace(R,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||$.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&$.error(a[0]),a},PSEUDO:function(a,b,c){var d,e;if(S.CHILD.test(a[0]))return null;if(a[3])a[2]=a[3];else if(d=a[4])K.test(d)&&(e=bc(d,b,c,!0))&&(e=d.indexOf(")",d.length-e)-d.length)&&(d=d.slice(0,e),a[0]=a[0].slice(0,e)),a[2]=d;return a.slice(0,3)}},filter:{ID:e?function(a){return a=a.replace(R,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(R,""),function(b){var c=typeof b.getAttributeNode!==n&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(R,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=x[o][a];return b||(b=x(a,new RegExp("(^|"+A+")"+a+"("+A+"|$)"))),function(a){return b.test(a.className||typeof a.getAttribute!==n&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=$.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return $.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=s++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[o]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[o]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e,g=f.pseudos[a]||f.pseudos[a.toLowerCase()];return g||$.error("unsupported pseudo: "+a),g[o]?g(b,c,d):g.length>1?(e=[a,a,"",b],function(a){return g(a,0,e)}):g}},pseudos:{not:v(function(a,b,c){var d=j(a.replace(H,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!f.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:v(function(a){return function(b){return(b.textContent||b.innerText||g(b)).indexOf(a)>-1}}),has:v(function(a){return function(b){return $(a,b).length>0}}),header:function(a){return P.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:_("radio"),checkbox:_("checkbox"),file:_("file"),password:_("password"),image:_("image"),submit:ba("submit"),reset:ba("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return Q.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e",a.querySelectorAll("[selected]").length||e.push("\\["+A+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+A+"*(?:\"\"|'')"),a.innerHTML="",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bk=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return u.apply(f,t.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j,k,l,m=d.getAttribute("id"),n=m||o,p=N.test(a)&&d.parentNode||d;m?n=n.replace(c,"\\$&"):d.setAttribute("id",n),j=bc(a,d,h),n="[id='"+n+"']";for(k=0,l=j.length;k0})}(),f.setFilters.nth=f.setFilters.eq,f.filters=f.pseudos,$.attr=p.attr,p.find=$,p.expr=$.selectors,p.expr[":"]=p.expr.pseudos,p.unique=$.uniqueSort,p.text=$.getText,p.isXMLDoc=$.isXML,p.contains=$.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b0)for(e=d;e=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*\s*$/g,bz={option:[1,""],legend:[1,""],thead:[1,""],tr:[2,""],td:[3,""],col:[2,""],area:[1,""],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X","
"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1>$2>");try{for(;d1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=b===e&&bA,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(f=0;(h=a[f])!=null;f++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{s=s||bk(b),l=b.createElement("div"),s.appendChild(l),h=h.replace(bo,"<$1>$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]===""&&!m?l.childNodes:[];for(g=n.length-1;g>=0;--g)p.nodeName(n[g],"tbody")&&!n[g].childNodes.length&&n[g].parentNode.removeChild(n[g])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l.parentNode.removeChild(l)}h.nodeType?t.push(h):p.merge(t,h)}l&&(h=l=s=null);if(!p.support.appendChecked)for(f=0;(h=t[f])!=null;f++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(f=0;(h=t[f])!=null;f++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[f+1,0].concat(r)),f+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.chrome?b.webkit=!0:b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^(none|table(?!-c[ea]).+)/,bO=/^margin/,bP=new RegExp("^("+q+")(.*)$","i"),bQ=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bR=new RegExp("^([-+])=("+q+")","i"),bS={},bT={position:"absolute",visibility:"hidden",display:"block"},bU={letterSpacing:0,fontWeight:400},bV=["Top","Right","Bottom","Left"],bW=["Webkit","O","Moz","ms"],bX=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return b$(this,!0)},hide:function(){return b$(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bX.apply(this,arguments):this.each(function(){(c?a:bZ(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bY(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bR.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bY(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bU&&(f=bU[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(b,c){var d,e,f,g,h=a.getComputedStyle(b,null),i=b.style;return h&&(d=h[c],d===""&&!p.contains(b.ownerDocument,b)&&(d=p.style(b,c)),bQ.test(d)&&bO.test(c)&&(e=i.width,f=i.minWidth,g=i.maxWidth,i.minWidth=i.maxWidth=i.width=d,d=h.width,i.width=e,i.minWidth=f,i.maxWidth=g)),d}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bQ.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth===0&&bN.test(bH(a,"display"))?p.swap(a,bT,function(){return cb(a,b,d)}):cb(a,b,d)},set:function(a,c,d){return b_(a,c,d?ca(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bQ.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bV[d]+b]=e[d]||e[d-2]||e[0];return f}},bO.test(a)||(p.cssHooks[a+b].set=b_)});var cd=/%20/g,ce=/\[\]$/,cf=/\r?\n/g,cg=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,ch=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ch.test(this.nodeName)||cg.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(cf,"\r\n")}}):{name:b.name,value:c.replace(cf,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ci(d,a[d],c,f);return e.join("&").replace(cd,"+")};var cj,ck,cl=/#.*$/,cm=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,co=/^(?:GET|HEAD)$/,cp=/^\/\//,cq=/\?/,cr=/
\ No newline at end of file
diff --git a/gocart/themes/default/views/category.php b/gocart/themes/default/views/category.php
new file mode 100644
index 00000000..6cff0f22
--- /dev/null
+++ b/gocart/themes/default/views/category.php
@@ -0,0 +1,109 @@
+
+
+
+
+ description)): ?>
+
+
+
+
+
+
+
+
+
+
+ 0): ?>
+
+
+
+
+
+
+
+
+ 0):?>
+
+
+
+
+
pagination->create_links();?>
+
+
+
+ -
+ images = array_values($product->images);
+
+ if(!empty($product->images[0]))
+ {
+ $primary = $product->images[0];
+ foreach($product->images as $photo)
+ {
+ if(isset($photo->primary))
+ {
+ $primary = $photo;
+ }
+ }
+
+ $photo = '
';
+ }
+ ?>
+
+
+
+
+ excerpt != ''): ?>
+ excerpt; ?>
+
+
+
+ saleprice > 0):?>
+ price); ?>
+ saleprice); ?>
+
+ price); ?>
+
+
+ track_stock && $product->quantity < 1) { ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/gocart/themes/default/views/checkout/address_form.php b/gocart/themes/default/views/checkout/address_form.php
new file mode 100644
index 00000000..1a5184da
--- /dev/null
+++ b/gocart/themes/default/views/checkout/address_form.php
@@ -0,0 +1,242 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+Customer_model->is_logged_in(false, false)) : ?>
+
+
+
+Location_model->get_countries_menu();
+
+if(!empty($customer[$address_form_prefix.'_address']['country_id']))
+{
+ $zone_menu = $this->Location_model->get_zones_menu($customer[$address_form_prefix.'_address']['country_id']);
+}
+else
+{
+ $zone_menu = array(''=>'')+$this->Location_model->get_zones_menu(array_shift(array_keys($countries)));
+}
+
+//form elements
+
+$company = array('placeholder'=>lang('address_company'),'class'=>'address span8', 'name'=>'company', 'value'=> set_value('company', @$customer[$address_form_prefix.'_address']['company']));
+$address1 = array('placeholder'=>lang('address1'), 'class'=>'address span8', 'name'=>'address1', 'value'=> set_value('address1', @$customer[$address_form_prefix.'_address']['address1']));
+$address2 = array('placeholder'=>lang('address2'), 'class'=>'address span8', 'name'=>'address2', 'value'=> set_value('address2', @$customer[$address_form_prefix.'_address']['address2']));
+$first = array('placeholder'=>lang('address_firstname'), 'class'=>'address span4', 'name'=>'firstname', 'value'=> set_value('firstname', @$customer[$address_form_prefix.'_address']['firstname']));
+$last = array('placeholder'=>lang('address_lastname'), 'class'=>'address span4', 'name'=>'lastname', 'value'=> set_value('lastname', @$customer[$address_form_prefix.'_address']['lastname']));
+$email = array('placeholder'=>lang('address_email'), 'class'=>'address span4', 'name'=>'email', 'value'=> set_value('email', @$customer[$address_form_prefix.'_address']['email']));
+$phone = array('placeholder'=>lang('address_phone'), 'class'=>'address span4', 'name'=>'phone', 'value'=> set_value('phone', @$customer[$address_form_prefix.'_address']['phone']));
+$city = array('placeholder'=>lang('address_city'), 'class'=>'address span3', 'name'=>'city', 'value'=> set_value('city', @$customer[$address_form_prefix.'_address']['city']));
+$zip = array('placeholder'=>lang('address_postcode'), 'maxlength'=>'10', 'class'=>'address span2', 'name'=>'zip', 'value'=> set_value('zip', @$customer[$address_form_prefix.'_address']['zip']));
+
+
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+ Customer_model->is_logged_in(false, false)) : ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Customer_model->is_logged_in(false, false)) : ?>
+
+
+
\ No newline at end of file
diff --git a/gocart/views/checkout/checkout.php b/gocart/themes/default/views/checkout/checkout.php
similarity index 56%
rename from gocart/views/checkout/checkout.php
rename to gocart/themes/default/views/checkout/checkout.php
index 7a4dc4fc..c04f89e4 100644
--- a/gocart/views/checkout/checkout.php
+++ b/gocart/themes/default/views/checkout/checkout.php
@@ -1,28 +1,78 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
-