Your IP : 216.73.216.147


Current Path : /home/lejardintz/www/media/foundry/3.1/scripts/
Upload File :
Current File : /home/lejardintz/www/media/foundry/3.1/scripts/stylesheet.min.js

FD31.plugin("stylesheet",function($){var head=document.getElementsByTagName("head")[0],stylesheets=document.styleSheets,IE_STYLESHEET=document.createStyleSheet,IE_MAX_STYLESHEET=31,IE_MAX_IMPORT=31,IE_MAX_RULE=4095;$.stylesheet=function(){var self=function(url,attr){var options={};return $.extend(options,self.defaultOptions,$.isPlainObject(url)?url:{url:url,attr:attr||{}}),void 0===options.url?self.create(options):self.load(options)};return $.extend(self,{defaultOptions:{type:"text/css",rel:"stylesheet",media:"all",title:"",forceInject:!1,xhr:!1},setup:function(options){$.extend(self.defaultOptions,options)
},availability:function(){var stat={},links=$('link[rel*="stylesheet"]');return styles=$("style"),stat.groups=IE_MAX_STYLESHEET-links.length-styles.length,stat.slots=stat.groups*IE_MAX_IMPORT,self.currentGroup&&(stat.slots+=IE_MAX_IMPORT-self.currentGroup.imports.length),stat},get:function(style){for(var i=0;i<stylesheets.length;i++){var stylesheet=stylesheets[i];if((stylesheet.ownerNode||stylesheet.owningElement)==style)return stylesheet}},create:function(options){var stylesheet,style,length=stylesheets.length;
if(IE_STYLESHEET){if(length>=IE_MAX_STYLESHEET)return;stylesheet=document.createStyleSheet(),style=stylesheet.ownerNode||stylesheet.owningElement}else style=document.createElement("style"),head.appendChild(style);$.extend(style,{type:options.type,title:options.title,media:options.media,rel:options.rel});var content=options.content;return void 0!==content&&(IE_STYLESHEET?stylesheet.cssText=content:style.appendChild(document.createTextNode(content))),style},nextAvailable:function(alsoCreateIfUnavailable){var stylesheet,length=stylesheets.length;
if(length){var i;for(i=length;i--;0>i){stylesheet=stylesheets[i];{if(!(IE_STYLESHEET&&(stylesheet.cssRules||stylesheet.rules).length>=IE_MAX_RULE))break;stylesheet=void 0}}}return stylesheet.ownerNode||stylesheet.owningElement||(alsoCreateIfUnavailable?self():void 0)},load:function(options){if($.browser.msie&&!options.forceInject)return self._import(options);var link=$("<link>").attr({href:options.url,type:options.type,rel:options.rel,media:options.media}).appendTo("head");return link[0]},_import:function(options){var failed;
if(void 0===self.currentGroup){var group;try{group=document.createStyleSheet(),group.media="all",group.title="jquery_stylesheet"}catch(e){failed=!0,options.verbose&&console.error("There is not enough slots left to create a new stylesheet group.")}if(failed)return!1;self.currentGroup=group}try{self.currentGroup.addImport(options.url)}catch(e){failed=!0,options.verbose&&console.info("Import slots exceeded. Creating a new stylesheet group.")}return failed?(self.currentGroup=void 0,self._import(options)):!0}}),self
}(),function(){var cssRule=function(selectors,rules,style){$.extend(this,{id:$.uid(),style:style,selectors:[],preRule:"",rules:{},legacy:8===$.IE,important:!1}),selectors&&this.set(selectors,rules)};$.extend(cssRule.prototype,{set:function(selectors,rules){return this.selectors=$.isString(selectors)?selectors.split(","):selectors,$.isString(rules)?(this.preRule=rules+"\n",this.rules={}):(this.preRule="",this.rules=rules||this.rules),this.update(),this},cssText:function(){return this.selectors.join(",")+"{"+this.ruleText()+"}\n"
},ruleText:function(){var important=this.important;return this.preRule+(this.legacy?"-rule-id:"+this.id+";":"")+$.map(this.rules,function(val,prop){return $.isNumeric(val)&&!$.cssNumber[prop]&&(val+="px"),important&&(val+=" !important"),prop+":"+val}).join(";")},update:function(){if(this.legacy)return this.updateLegacy();var cssText=this.cssText();return void 0===this.textNode?(this.textNode=document.createTextNode(cssText),this.style.appendChild(this.textNode)):this.textNode.nodeValue=cssText,this},updateLegacy:function(){this.removeLegacy();
for(var stylesheet=$.stylesheet.get(this.style),selectors=this.selectors,ruleText=this.ruleText(),i=0;i<selectors.length;i++)stylesheet.addRule(selectors[i],ruleText);return this},remove:function(){return this.legacy?this.removeLegacy():(void 0!==this.textNode&&(this.style.removeChild(this.textNode),delete this.textNode),this)},removeLegacy:function(){for(var stylesheet=$.stylesheet.get(this.style),rules=stylesheet.rules,i=0;i<rules.length;i++)null!==rules[i].cssText.match(this.id)&&stylesheet.removeRule(i);
return this},css:function(prop,val){return $.isString(prop)&&void 0===val?this.rules[prop]:($.isPlainObject(prop)?$.extend(this.rules,prop):this.rules[prop]=val,this.update(),this)}});var self=$.cssRule=function(selector,rules,style){var style=style||self.style||$.stylesheet.nextAvailable(!0);if(style)return new cssRule(selector,rules,style)};self.style=$.stylesheet()}(),function(){$.cssUrl=function(url){return'url("'+encodeURI(url)+'")'}}()});