| Current Path : /home/sunflowe/www2/vacancesfloride/templates/yoo_revista/warp/js/ |
| Current File : /home/sunflowe/www2/vacancesfloride/templates/yoo_revista/warp/js/responsive.js |
/* Copyright (C) YOOtheme GmbH, http://www.gnu.org/licenses/gpl.html GNU/GPL */
!function(e,t,n){function i(e){return u.innerHTML='­<style media="'+e+'"> #mq-test-1 { width: 42px; }</style>',s.insertBefore(d,c),o=42==u.offsetWidth,s.removeChild(d),o}function a(e){var t=i(e.media);if(e._listeners&&e.matches!=t){e.matches=t;for(var n=0,a=e._listeners.length;a>n;n++)e._listeners[n](e)}}function r(e,t,n){var i;return function(){var a=this,r=arguments,o=function(){i=null,n||e.apply(a,r)},s=n&&!i;clearTimeout(i),i=setTimeout(o,t),s&&e.apply(a,r)}}if(!t.matchMedia||e.userAgent.match(/(iPhone|iPod|iPad)/i)){var o,s=n.documentElement,c=s.firstElementChild||s.firstChild,d=n.createElement("body"),u=n.createElement("div");u.id="mq-test-1",u.style.cssText="position:absolute;top:-100em",d.style.background="none",d.appendChild(u),t.matchMedia=function(e){var o,s=[];return o={matches:i(e),media:e,_listeners:s,addListener:function(e){"function"==typeof e&&s.push(e)},removeListener:function(e){for(var t=0,n=s.length;n>t;t++)s[t]===e&&delete s[t]}},t.addEventListener&&t.addEventListener("resize",r(function(){a(o)},150),!1),n.addEventListener&&n.addEventListener("orientationchange",function(){a(o)},!1),o}}}(navigator,window,document),function(e,t,n){if(!e.onMediaQuery){var i={},a=t.matchMedia&&t.matchMedia("only all").matches;e(n).ready(function(){for(var t in i){e(i[t]).trigger("init");i[t].matches&&e(i[t]).trigger("valid")}}),e(t).bind("load",function(){for(var t in i)i[t].matches&&e(i[t]).trigger("valid")}),e.onMediaQuery=function(n,r){var o=n&&i[n];return o||(o=i[n]=t.matchMedia(n),o.supported=a,o.addListener(function(){e(o).trigger(o.matches?"valid":"invalid")})),e(o).bind(r),o}}}(jQuery,window,document),function(e,t,n){e.fn.responsiveMenu=function(i){function a(t,n){var i="";return e(t).children().each(function(){var t=e(this);t.children("a, span.separator").each(function(){var r=e(this),o=r.is("a")?r.attr("href"):"",s=r.is("span")?" disabled":"",c=n>1?new Array(n).join("-")+" ":"",d=r.find(".title").length?r.find(".title").text():r.text();i+='<option value="'+o+'" class="'+r.attr("class")+'"'+s+">"+c+d+"</option>",t.find("ul.level"+(n+1)).each(function(){i+=a(this,n+1)})})}),i}return i=e.extend({current:".current"},i),this.each(function(){var r=e(this),o=(i.target||this,e("<select/>")),s="";r.find("ul.menu").each(function(){s+=a(this,1)}),o.append(s).change(function(){n.location.href=o.val()}),o.find(i.current).attr("selected",!0),/iPhone|iPad|iPod/.test(t.platform)&&/OS [1-5]_[0-9_]* like Mac OS X/i.test(t.userAgent)&&t.userAgent.indexOf("AppleWebKit")>-1&&o.find(":disabled").remove(),r.after(o)})}}(jQuery,navigator,window),function(e,t){function n(){u.setAttribute("content",h),m=!0}function i(){u.setAttribute("content",f),m=!1}function a(t){d=t.accelerationIncludingGravity,o=Math.abs(d.x),s=Math.abs(d.y),c=Math.abs(d.z),e.orientation&&180!==e.orientation||!(o>7||(c>6&&8>s||8>c&&s>6)&&o>5)?m||n():m&&i()}if(/iPhone|iPad|iPod/.test(t.platform)&&/OS [1-5]_[0-9_]* like Mac OS X/i.test(t.userAgent)&&t.userAgent.indexOf("AppleWebKit")>-1){var r=e.document;if(r.querySelector){var o,s,c,d,u=r.querySelector("meta[name=viewport]"),l=u&&u.getAttribute("content"),f=l+",maximum-scale=1",h=l+",maximum-scale=10",m=!0;u&&(e.addEventListener("orientationchange",n,!1),e.addEventListener("devicemotion",a,!1))}}}(this,navigator);