/*! UIkit 2.9.0 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */ !function(a){var b;jQuery&&jQuery.UIkit&&(b=a(jQuery,jQuery.UIkit)),"function"==typeof define&&define.amd&&define("uikit-cover",["uikit"],function(){return b||a(jQuery,jQuery.UIkit)})}(function(a,b){"use strict";b.component("cover",{defaults:{automute:!0},init:function(){if(this.parent=this.element.parent(),this.dimension={w:this.element.width(),h:this.element.height()},this.ratio=this.dimension.w/this.dimension.h,b.$win.on("load resize orientationchange",b.Utils.debounce(function(){this.check()}.bind(this),100)),this.check(),this.element.data("cover",this),this.element.is("iframe")&&this.options.automute){var a=this.element.attr("src");this.element.attr("src","").on("load",function(){this.contentWindow.postMessage('{ "event": "command", "func": "mute", "method":"setVolume", "value":0}',"*")}).attr("src",[a,a.indexOf("?")>-1?"&":"?","enablejsapi=1&api=1"].join(""))}},check:function(){var a,b,c=this.parent.width(),d=this.parent.height();c/this.ratio