%PDF- %PDF-
Direktori : /var/www/projetos/takthua.com.br/wp-content/plugins/maintenance/load/js/ |
Current File : /var/www/projetos/takthua.com.br/wp-content/plugins/maintenance/load/js/jquery.blur.min.js |
(function(window,document,$){var cache={filterId:0};var Vague=function(elm,customOptions){var defaultOptions={intensity:5},options=$.extend(defaultOptions,customOptions);this.$elm=elm instanceof $?elm:$(elm);var blurred=false;var browserPrefixes=" -webkit- -moz- -o- -ms- ".split(" ");var cssPrefixString={};var cssPrefix=function(property){if(cssPrefixString[property]||cssPrefixString[property]==="")return cssPrefixString[property]+property;var e=document.createElement("div");var prefixes=["","Moz", "Webkit","O","ms","Khtml"];for(var i in prefixes)if(typeof e.style[prefixes[i]+property]!=="undefined"){cssPrefixString[property]=prefixes[i];return prefixes[i]+property}return property.toLowerCase()};var cssfilters=function(){var el=document.createElement("div");el.style.cssText=browserPrefixes.join("filter"+":blur(2px); ");return!!el.style.length&&(document.documentMode===undefined||document.documentMode>9)}();var svgfilters=function(){var result=false;try{result=typeof SVGFEColorMatrixElement!== undefined&&SVGFEColorMatrixElement.SVG_FECOLORMATRIX_TYPE_SATURATE==2}catch(e){}return result}();var appendSVGFilter=function(){var filterMarkup="<svg id='vague-svg-blur'>"+"<filter id='blur-effect-id-"+cache.filterId+"'>"+"<feGaussianBlur stdDeviation='"+options.intensity+"' />"+"</filter>"+"</svg>";$("body").append(filterMarkup)};this.init=function(){if(svgfilters)appendSVGFilter();this.$elm.data("vague-filter-id",cache.filterId);cache.filterId++};this.blur=function(){var filterValue,filterId=this.$elm.data("vague-filter-id"), cssProp={};if(cssfilters)filterValue="blur("+options.intensity+"px)";else if(svgfilters)filterValue="url(#blur-effect-id-"+filterId+")";else filterValue="progid:DXImageTransform.Microsoft.Blur(pixelradius="+options.intensity+")";cssProp[cssPrefix("Filter")]=filterValue;this.$elm.css(cssProp);blurred=true};this.unblur=function(){var cssProp={};cssProp[cssPrefix("Filter")]="none";this.$elm.css(cssProp);blurred=false};this.toggleblur=function(){if(blurred)this.unblur();else this.blur()};this.destroy= function(){if(svgfilters)$("filter#blur-effect-id-"+this.$elm.data("vague-filter-id")).parent().remove();this.unblur()};return this.init()};$.fn.Vague=function(options){return new Vague(this,options)};window.Vague=Vague})(window,document,jQuery);