﻿/*
* JSizes - JQuery plugin v0.33
*
* Licensed under the revised BSD License.
* Copyright 2008-2010 Bram Stein
* All rights reserved.
*/
(function (b) { var a = function (c) { return parseInt(c, 10) || 0 }; b.each(["min", "max"], function (d, c) { b.fn[c + "Size"] = function (g) { var f, e; if (g) { if (g.width !== undefined) { this.css(c + "-width", g.width) } if (g.height !== undefined) { this.css(c + "-height", g.height) } return this } else { f = this.css(c + "-width"); e = this.css(c + "-height"); return { width: (c === "max" && (f === undefined || f === "none" || a(f) === -1) && Number.MAX_VALUE) || a(f), height: (c === "max" && (e === undefined || e === "none" || a(e) === -1) && Number.MAX_VALUE) || a(e)} } } }); b.fn.isVisible = function () { return this.is(":visible") }; b.each(["border", "margin", "padding"], function (d, c) { b.fn[c] = function (e) { if (e) { if (e.top !== undefined) { this.css(c + "-top" + (c === "border" ? "-width" : ""), e.top) } if (e.bottom !== undefined) { this.css(c + "-bottom" + (c === "border" ? "-width" : ""), e.bottom) } if (e.left !== undefined) { this.css(c + "-left" + (c === "border" ? "-width" : ""), e.left) } if (e.right !== undefined) { this.css(c + "-right" + (c === "border" ? "-width" : ""), e.right) } return this } else { return { top: a(this.css(c + "-top" + (c === "border" ? "-width" : ""))), bottom: a(this.css(c + "-bottom" + (c === "border" ? "-width" : ""))), left: a(this.css(c + "-left" + (c === "border" ? "-width" : ""))), right: a(this.css(c + "-right" + (c === "border" ? "-width" : "")))} } } }) })(jQuery);
