{"title":"Sale","description":"\u003cscript\u003e\/\/ \u003c![CDATA[\n\/*\n * jQuery Shorten plugin 1.1.0\n *\n * Copyright (c) 2014 Viral Patel\n * http:\/\/viralpatel.net\n *\n * Licensed under the MIT license:\n *   http:\/\/www.opensource.org\/licenses\/mit-license.php\n *\/\n\n\/*\n** updated by Jeff Richardson\n** Updated to use strict,\n** IE 7 has a \"bug\" It is returning underfined when trying to reference string characters in this format\n** content[i]. IE 7 allows content.charAt(i) This works fine in all modern browsers.\n** I've also added brackets where they werent added just for readability (mostly for me).\n*\/\n\n(function($) {\n    $.fn.shorten = function(settings) {\n        \"use strict\";\n\n        var config = {\n            showChars: 0,\n            ellipsesText: \"\",\n            moreText: \"LEARN MORE + \",\n            lessText: \"Read Less\",\n            errMsg: null,\n            force: false\n        };\n\n        if (settings) {\n            $.extend(config, settings);\n        }\n\n        if ($(this).data('jquery.shorten') \u0026\u0026 !config.force) {\n            return false;\n        }\n        $(this).data('jquery.shorten', true);\n\n        $(document).off(\"click\", '.morelink');\n\n        $(document).on({\n            click: function() {\n\n                var $this = $(this);\n                if ($this.hasClass('less')) {\n                    $this.removeClass('less');\n                    $this.html(config.moreText);\n                    $this.parent().prev().prev().show(); \/\/ shortcontent\n                    $this.parent().prev().hide(); \/\/ allcontent\n\n                } else {\n                    $this.addClass('less');\n                    $this.html(config.lessText);\n                    $this.parent().prev().prev().hide(); \/\/ shortcontent\n                    $this.parent().prev().show(); \/\/ allcontent\n                }\n                return false;\n            }\n        }, '.morelink');\n\n        return this.each(function() {\n            var $this = $(this);\n\n            var content = $this.html();\n            var contentlen = $this.text().length;\n            if (contentlen \u003e config.showChars) {\n                var c = content.substr(0, config.showChars);\n                if (c.indexOf('\u003c') \u003e= 0) \/\/ If there's HTML don't want to cut it\n                {\n                    var inTag = false; \/\/ I'm in a tag?\n                    var bag = ''; \/\/ Put the characters to be shown here\n                    var countChars = 0; \/\/ Current bag size\n                    var openTags = []; \/\/ Stack for opened tags, so I can close them later\n                    var tagName = null;\n\n                    for (var i = 0, r = 0; r \u003c= config.showChars; i++) {\n                        if (content[i] == '\u003c' \u0026\u0026 !inTag) {\n                            inTag = true;\n\n                            \/\/ This could be \"tag\" or \"\/tag\"\n                            tagName = content.substring(i + 1, content.indexOf('\u003e', i));\n\n                            \/\/ If its a closing tag\n                            if (tagName[0] == '\/') {\n\n\n                                if (tagName != '\/' + openTags[0]) {\n                                    config.errMsg = 'ERROR en HTML: the top of the stack should be the tag that closes';\n                                } else {\n                                    openTags.shift(); \/\/ Pops the last tag from the open tag stack (the tag is closed in the retult HTML!)\n                                }\n\n                            } else {\n                                \/\/ There are some nasty tags that don't have a close tag like \u003cbr\/\u003e\n                                if (tagName.toLowerCase() != 'br') {\n                                    openTags.unshift(tagName); \/\/ Add to start the name of the tag that opens\n                                }\n                            }\n                        }\n                        if (inTag \u0026\u0026 content[i] == '\u003e') {\n                            inTag = false;\n                        }\n\n                        if (inTag) { bag += content.charAt(i); } \/\/ Add tag name chars to the result\n                        else {\n                            r++;\n                            if (countChars \u003c= config.showChars) {\n                                bag += content.charAt(i); \/\/ Fix to ie 7 not allowing you to reference string characters using the []\n                                countChars++;\n                            } else \/\/ Now I have the characters needed\n                            {\n                                if (openTags.length \u003e 0) \/\/ I have unclosed tags\n                                {\n                                    \/\/console.log('They were open tags');\n                                    \/\/console.log(openTags);\n                                    for (j = 0; j \u003c openTags.length; j++) {\n                                        \/\/console.log('Cierro tag ' + openTags[j]);\n                                        bag += '\u003c\/' + openTags[j] + '\u003e'; \/\/ Close all tags that were opened\n\n                                        \/\/ You could shift the tag from the stack to check if you end with an empty stack, that means you have closed all open tags\n                                    }\n                                    break;\n                                }\n                            }\n                        }\n                    }\n                    c = $('\u003cdiv\/\u003e').html(bag + '\u003cspan class=\"ellip\"\u003e' + config.ellipsesText + '\u003c\/span\u003e').html();\n                }else{\n                    c+=config.ellipsesText;\n                }\n\n                var html = '\u003cdiv class=\"shortcontent\"\u003e' + c +\n                    '\u003c\/div\u003e\u003cdiv class=\"allcontent\"\u003e' + content +\n                    '\u003c\/div\u003e\u003cspan\u003e\u003ca href=\"javascript:\/\/nop\/\" class=\"morelink\"\u003e' + config.moreText + '\u003c\/a\u003e\u003c\/span\u003e';\n\n                $this.html(html);\n                $this.find(\".allcontent\").hide(); \/\/ Hide all text\n                $('.shortcontent p:last', $this).css('margin-bottom', 0); \/\/Remove bottom margin on last paragraph as it's likely shortened\n            }\n        });\n\n    };\n\n})(jQuery);\n\n$(document).ready(function() {\n$(\".text-collapse\").shorten();\n});\n\/\/ ]]\u003e\u003c\/script\u003e\n\u003cdiv class=\"text-collapse\"\u003e\n\u003ch2\u003eYoga Sale\u003c\/h2\u003e\n\u003cp\u003eWe’ll let you in on a little secret here at Gaiam. A few times each year, our product development and apparel design teams clear out their research rooms, sample racks, and storage closets to bring us employees one of the most coveted events of the season: the Gaiam sample sale.\u003c\/p\u003e\n\u003cp\u003eClothing racks line the walls, crammed with last season’s clothing, scrapped seconds and one-off samples. Piles of yoga mats, tall and heaping, loom in the corner. Foldable tables are pushed end to end, stacked high with DVDs, yoga gear, fitness accessories, and photo shoot props. Special appearances are made by exotic furniture, products of seasons past, and prototypes that never made it to production. Otherwise cordial and considerate co-workers become hungry competitors, ruthlessly snatching that one-of-a-kind top out of another’s hands. There are those who hoard all the “good mats” for Christmas presents, even when Christmas is still nine months away. (Alright, so there may be a little embellishment here, but it’s all in the name of riveting storytelling.) Payment is only cash or check — no credit cards, newbies! — and goodie piles will only be held an hour. Come early, come caffeinated, and come with your car trunk empty.\u003c\/p\u003e\n\u003cp\u003eWhile this epic yoga sale is a perk provided only to Gaiam employees, we do what we can to spread the love to our other most valued group: our loyal customers. Our yoga sale page features some of our coveted, high-quality products at appealing (and sometimes rare!) prices. You’ll also find products that are discontinued, last season’s, or ones we made a few too many of. But above all, you’ll find good deals, amazing values, and reasonable prices. And even if we can’t bring you inside the mayhem that is our employee sample sale, we can bring you great value and prices on the products you’ve grown to love.\u003c\/p\u003e\n\u003c\/div\u003e","products":[],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/1728\/2157\/collections\/Z-Sale.jpg?v=1552600650","url":"https:\/\/www.gaiam.com\/collections\/sale.oembed?page=2","provider":"Gaiam","version":"1.0","type":"link"}