// source --> https://kamith.org/wp-content/themes/s5_prestige_academy/js/core/s5_flex_menu-min.js function s5_create_separator_class(){if(document.getElementById("subMenusContainer"))for(var t=document.getElementById("subMenusContainer").getElementsByTagName("A"),e=0;e>>0;i>n;n++)if(n in this&&!t.call(e,this[n],n,this))return!1;return!0},Array.prototype.filter=function(t,e){for(var n,i=[],s=0,o=this.length>>>0;o>s;s++)s in this&&(n=this[s],t.call(e,n,s,this)&&i.push(n));return i},Array.prototype.indexOf=function(t,e){for(var n=this.length>>>0,i=0>e?Math.max(0,n+e):e||0;n>i;i++)if(this[i]===t)return i;return-1},Array.prototype.map=function(t,e){for(var n=this.length>>>0,i=Array(n),s=0;n>s;s++)s in this&&(i[s]=t.call(e,this[s],s,this));return i},Array.prototype.some=function(t,e){for(var n=0,i=this.length>>>0;i>n;n++)if(n in this&&t.call(e,this[n],n,this))return!0;return!1},Array.prototype.clean=function(){return this.filter(function(t){return null!=t})},Array.prototype.invoke=function(t){var e=Array.slice(arguments,1);return this.map(function(n){return n[t].apply(n,e)})},Array.prototype.associate=function(t){for(var e={},n=Math.min(this.length,t.length),i=0;n>i;i++)e[t[i]]=this[i];return e},Array.prototype.link=function(t){for(var e={},n=0,i=this.length;i>n;n++)for(var s in t)if(t[s](this[n])){e[s]=this[n],delete t[s];break}return e},Array.prototype.contains=function(t,e){return-1!=this.indexOf(t,e)},Array.prototype.append=function(t){return this.push.apply(this,t),this},Array.prototype.getLast=function(){return this.length?this[this.length-1]:null},Array.prototype.getRandom=function(){return this.length?this[Number.random(0,this.length-1)]:null},Array.prototype.include=function(t){return this.contains(t)||this.push(t),this},Array.prototype.combine=function(t){for(var e=0,n=t.length;n>e;e++)this.include(t[e]);return this},Array.prototype.erase=function(t){for(var e=this.length;e--;)this[e]===t&&this.splice(e,1);return this},Array.prototype.empty=function(){return this.length=0,this},Array.prototype.flatten=function(){for(var t=[],e=0,n=this.length;n>e;e++){var i=typeOf(this[e]);"null"!=i&&(t=t.concat("array"==i||"collection"==i||"arguments"==i||instanceOf(this[e],Array)?Array.flatten(this[e]):this[e]))}return t},Array.prototype.pick=function(){for(var t=0,e=this.length;e>t;t++)if(null!=this[t])return this[t];return null},Array.prototype.hexToRgb=function(t){if(3!=this.length)return null;var e=this.map(function(t){return 1==t.length&&(t+=t),t.toInt(16)});return t?e:"rgb("+e+")"},Array.prototype.rgbToHex=function(t){if(this.length<3)return null;if(4==this.length&&0==this[3]&&!t)return"transparent";for(var e=[],n=0;3>n;n++){var i=(this[n]-0).toString(16);e.push(1==i.length?"0"+i:i)}return t?e:"#"+e.join("")},void 0==Function.prototype.bind&&(Function.prototype.bind=function(t){var e=this,n=arguments.length>1?Array.slice(arguments,1):null,i=function(){},s=function(){var o=t,a=arguments.length;this instanceof s&&(i.prototype=e.prototype,o=new i);var r=n||a?e.apply(o,n&&a?n.concat(Array.slice(arguments)):n||arguments):e.call(o);return o==t?r:o};return s}),function(t){t.fn.getLast=function(e){return t(this).children().last()},t.fn.getPrevious=t.fn.prev,t.fn.getFirst=function(e){return t(this).children().first()},t.fn.getNext=t.fn.next,t.fn.fireEvents=function(e){t(this).each(function(n,i){t(i).trigger(e)})},MenuMatic=window.MenuMatic=function(t){this.options={id:"s5_nav",subMenusContainerId:"subMenusContainer",tabletWidth:800,effect:"slide & fade",duration:600,physics:"easeOutQuad",hideDelay:1e3,displayDelay:0,stretchMainMenu:!1,matchWidthMode:!1,orientation:"horizontal",direction:{x:"right",y:"down"},olddirection:{x:"right",y:"down"},tweakInitial:{x:0,y:0},tweakSubsequent:{x:0,y:0},center:!1,opacity:95,mmbFocusedClassName:null,mmbClassName:null,killDivider:null,fullWidth:null,fixHasLayoutBug:!1,onHideAllSubMenusNow_begin:function(){},onHideAllSubMenusNow_complete:function(){},onInit_begin:function(){},onInit_complete:function(){}},this.hideAllMenusTimeout=null,this.S5DisplayMenusTimeout=null,this.allSubMenus=[],this.subMenuZindex=1,this.initialize(t),this.stretch(),this.killDivider(),this.center()},MenuMatic.prototype.initialize=function(n){this.options=t.extend(this.options,n),this.options.olddirection.x=this.options.direction.x,this.options.olddirection.y=this.options.direction.y,this.options.opacity>99&&(this.options.opacity=99.9),this.options.opacity=this.options.opacity/100,this.options.direction.x=this.options.direction.x.toLowerCase(),this.options.direction.y=this.options.direction.y.toLowerCase(),"right"===this.options.direction.x?this.options.direction.xInverse="left":"left"===this.options.direction.x&&(this.options.direction.xInverse="right"),"up"===this.options.direction.y?this.options.direction.yInverse="down":"down"===this.options.direction.y&&(this.options.direction.yInverse="up");var i=t("#"+this.options.id+" li, span.grouped_sub_parent_item"),s=new Array;t(i).each(function(e,n){if(t(n).data("parentLinks",t(n).parents("li")),t(n).children("ul")&&t(n).children("ul").length>=1){var i=t(n).children("ul");s[e]=""}else var i=null;t(n).data("childMenu",i),i&&i.data("parentMenu",t(n)),theSubMenuType="subsequent",t(t(n).parents("ul")||t(n).parents("ol")).attr("id")===this.options.id&&(theSubMenuType="initial"),t(n).data("subMenuType",theSubMenuType),"initial"===theSubMenuType&&t(t(n).children("ul")||t(n).children("ol"))?t(n).addClass("mainMenuParentBtn"):t(t(n).children("ul")||t(n).children("ol"))&&t(n).addClass("subMenuParentBtn")}.bind(this));var o=t("
").attr("id",this.options.subMenusContainerId).appendTo(t("body")),a=new Array;t("#"+this.options.id+" ul").each(function(e,n){if(0==t(n).parents("div[class*=moduletable]").length){if(t(n).parents("span.grouped_sub_parent_item").size()>0)var s=i.index(t(n).parents("span.grouped_sub_parent_item"));else var s=i.index(t(n).parent("li"));if(0==a.contains(s)){if(a.include(s),"initial"==t(n).parent().data("subMenuType"))var r=t("
").addClass("s5_sub_wrap").attr("id","ul_child_"+s).appendTo(o);else var r=t("
").addClass("s5_sub_wrap_lower").attr("id","ul_child_"+s).appendTo(o);var d=t("").appendTo(r);t("
  • ").attr("id","li_child_"+s).appendTo(d).append(n)}else t("#li_child_"+s)&&t("#li_child_"+s).append(n)}}),t("a",o).attr("tabindex","-1"),i.each(function(n,i){if(t(i).data("childMenu")){t(i).data("childMenu",t("#ul_child_"+n)),t("#ul_child_"+n).data("parentMenu",t(i)),this.allSubMenus.include(t(i).data("childMenu"));var s=[];t(i).data("parentLinks").each(function(e,n){t(n).data("childMenu")?s.include(t(n).data("childMenu")[0]):s.include(t(n).parentsUntil("li").parentsUntil("div").parent()[0])}),t(i).data("parentSubMenus",t(s)),delete s;var o=new e;jQuery(i).data("subMenuInstance",o),o.initialize(this.options,this,t(i),n)}}.bind(this));var r=t("#"+this.options.id+" li").filter(function(e,n){return!t(n).data("childMenu")});r.each(function(e,n){t(n).bind("mouseenter",function(e){e.preventDefault(),this.hideAllSubMenusNow(),this.options.mmbClassName&&this.options.mmbFocusedClassName&&(t(n).data("btnMorph")?t(n).data("btnMorph"):t(n).switchClass(this.options.mmbFocusedClassName,"",this.options.duration/2,this.options.physics))}.bind(this)),t(n).bind("focus",function(e){e.preventDefault(),this.hideAllSubMenusNow(),this.options.mmbClassName&&this.options.mmbFocusedClassName&&(t(n).data("btnMorph")?t(n).data("btnMorph"):t(n).switchClass(this.options.mmbFocusedClassName,"",this.options.duration/2,this.options.physics))}.bind(this)),t(n).bind("mouseleave",function(e){e.preventDefault(),this.options.mmbClassName&&this.options.mmbFocusedClassName&&(t(n).data("btnMorph")?t(n).data("btnMorph"):t(n).switchClass(this.options.mmbClassName,"",this.options.duration/2,this.options.physics))}.bind(this)),t(n).bind("blur",function(e){e.preventDefault(),this.options.mmbClassName&&this.options.mmbFocusedClassName&&(t(n).data("btnMorph")?t(n).data("btnMorph"):t(n).switchClass(this.options.mmbClassName,"",this.options.duration/2,this.options.physics))}.bind(this)),t(n).bind("keydown",function(e){new Event(e);("up"===e.key||"down"===e.key||"left"===e.key||"right"===e.key)&&e.stop(),"left"===e.key&&"horizontal"===this.options.orientation||"up"===e.key&&"vertical"===this.options.orientation?t(n).parents("li").getPrevious("li")?t(n).parents("li").getPrevious("li").getFirst("a").focus():t(n).parents("li").parent().getLast("li").getFirst("a").focus():("right"===e.key&&"horizontal"===this.options.orientation||"down"===e.key&&"vertical"===this.options.orientation)&&(t(n).parents("li").getNext("li")?t(n).parents("li").getNext("li").getFirst("a").focus():t(n).parents("li").parent().getFirst("li").getFirst("a").focus())}.bind(this))}.bind(this)),this.onResizeWindow(),Eventx.onResizestart(this.hideAllSubMenusNow.bind(this)),Eventx.onResizend(this.onResizeWindow.bind(this))},MenuMatic.prototype.getWidth=function(){return this.options.fullWidth&&"function"==typeof this.options.fullWidth?this.options.fullWidth():"auto"},MenuMatic.prototype.onResizeWindow=function(){var e=this;if(t(window).width()>=this.options.tabletWidth){var n=window.needTablet=0;if(window.s5menuTablet)var i=window.needRevert=1;else var i=window.needRevert=0}else if(t(window).width()0||navigator.msMaxTouchPoints>0)){var i=window.needRevert=0;if(window.s5menuTablet)var n=window.needTablet=0;else var n=window.needTablet=1}if(n||i){var s=jQuery(".mainMenuParentBtn,.subMenuParentBtn,.mainParentBtn,.subParentBtn");s.each(function(s,o){if(!t(o).data("childMenu"))return n&&(t(o).unbind("mouseenter").bind("mouseenter",function(){jQuery(".mainParentBtnFocused").removeClass("mainParentBtnFocused"),jQuery(this).addClass("mainParentBtnFocused")}),t(o).unbind("mouseleave").bind("mouseleave",function(){jQuery(this).removeClass("mainParentBtnFocused")})),void(i&&t(o).unbind("mouseenter").bind("mouseenter",e.hideAllSubMenusNow.bind(e)));var a=t(o).data("subMenuInstance");if(n){window.s5menuTablet=1;var r=function(e){e.preventDefault(),jQuery(this).css({background:""}),"initial"==a.subMenuType?jQuery(this).addClass("mainMenuParentBtnFocused"):jQuery(this).addClass("subMenuParentBtn").addClass("subMenuParentBtnFocused"),"initial"===a.subMenuType&&a.options.mmbClassName&&a.options.mmbFocusedClassName&&(t(this).data("btnMorph")?t(this).data("btnMorph"):t(this).switchClass(a.options.mmbFocusedClassName,"",a.options.duration/2,a.options.physics))},d=function(e){return t(this).data("menuOpened")||("initial"==a.subMenuType?jQuery(this).removeClass("mainMenuParentBtnFocused").removeClass("mainMenuParentBtnTablet"):jQuery(this).removeClass("subMenuParentBtnFocused")),!1},u=function(e){if("SPAN"==e.target.nodeName&&e.target.hasAttribute("onclick")&&-1==e.target.getAttribute("onclick").indexOf("javascript:;"))return e.target.click(),!1;if("initial"==a.subMenuType?jQuery(this).removeClass("mainMenuParentBtnTablet"):jQuery(this).find(".S5_submenu_item").removeClass("S5_submenu_itemTablet"),t(this).data("menuOpened")){a.hideSubMenu(!0);var n=t(this).data("childMenu").find("li").filter(function(e,n){return t(n).data("childMenu")&&t(n).data("menuOpened")});return n.each(function(e,n){t(n).data("subMenuInstance").hideSubMenu();var i=t(n).data("childMenu").find("li").filter(function(e,n){return t(n).data("childMenu")&&t(n).data("menuOpened")});i.each(function(e,n){t(n).data("subMenuInstance").hideSubMenu()})}),t(this).data("menuOpened",!1),"initial"==a.subMenuType?jQuery(this).removeClass("mainMenuParentBtnFocused").addClass("mainMenuParentBtnTablet"):jQuery(this).find(".S5_submenu_item").addClass("S5_submenu_itemTablet"),!1}t(this).data("menuOpened",!0),e.preventDefault(),a.cancellHideAllSubMenus(),a.hideOtherSubMenus(),setTimeout(function(){a.showSubMenu()},10),"initial"===a.subMenuType&&a.options.mmbClassName&&a.options.mmbFocusedClassName&&(t(this).data("btnMorph")?t(this).data("btnMorph"):t(this).switchClass(a.options.mmbFocusedClassName,"",a.options.duration/2,a.options.physics))}}if(i){window.s5menuTablet=0;var r=t(o).data("mouseenterH"),d=t(o).data("mouseleaveH"),u=function(t){t.target.click()}}t(o).unbind("mouseenter").bind("mouseenter",r).unbind("mouseleave").bind("mouseleave",d).unbind("click").bind("click",u)}),jQuery("li[id*=li_child_] ul").each(function(e,s){var o=t(s).data("parentMenu");if(o){var a=o.data("subMenuInstance");if(n||i){if(n)var r=function(){"initial"==a.subMenuType?o.addClass("mainMenuParentBtnFocused"):o.addClass("subMenuParentBtnFocused")};if(i)var r=o.data("mouseenterH");t(s).bind("mouseenter",r)}}t(s).children("li").each(function(e,s){if(t(s).data("childMenu")){var o=t(s).data("subMenuInstance");if(n||i){if(n)var a=function(){0==t(s).data("menuOpened")&&("initial"==o.subMenuType?t(this).removeClass("mainMenuParentBtnFocused"):t(this).removeClass("subMenuParentBtnFocused"))},r=function(){"initial"==o.subMenuType?t(this).addClass("mainMenuParentBtnFocused"):t(this).addClass("subMenuParentBtnFocused").find(".S5_submenu_itemTablet").removeClass("S5_submenu_itemTablet")};if(i)var a=t(s).data("mouseleaveH"),r=t(s).data("mouseenterH");t(s).unbind("mouseleave").bind("mouseleave",a).unbind("mouseenter").bind("mouseenter",r)}}else{var a=t(s).data("mouseleaveH"),r=t(s).data("mouseenterH");i&&t(s).unbind("mouseleave").bind("mouseleave",a).unbind("mouseenter").bind("mouseenter",r),n&&t(s).unbind("mouseleave").unbind("mouseenter").bind("click",r)}})})}},MenuMatic.prototype.center=function(){this.options.center&&t("#"+this.options.id).css({left:"50%",marginLeft:-(t("#"+this.options.id).width()/2)})},MenuMatic.prototype.stretch=function(){if(this.options.stretchMainMenu&&"horizontal"===this.options.orientation){var e=parseFloat(t("#"+this.options.id).width()),n=0,i=t("#"+this.options.id+" li");if(i.css({paddingLeft:0,paddingRight:0}),i.each(function(e,i){n+=t(i).width()}.bind(this)),n>e)return;var s=(e-n)/i.length;i.each(function(e,n){t(n).css("width",t(n).width()+s)}.bind(this)),i.getLast().css("width",i.getLast().width()-1)}},MenuMatic.prototype.killDivider=function(){this.options.killDivider&&"first"===this.options.killDivider.toLowerCase()?t(t("#"+this.options.id+" li")[0]).css({background:"none"}):this.options.killDivider&&"last"===this.options.killDivider.toLowerCase()&&t(t("#"+this.options.id+" li").getLast()).css({background:"none"})},MenuMatic.prototype.hideAllSubMenusNow=function(){clearTimeout(this.hideAllMenusTimeout),t(this.allSubMenus).fireEvents("hidex")};var e=function(){this.options={onSubMenuInit_begin:function(t){},onSubMenuInit_complete:function(t){},onMatchWidth_begin:function(t){},onMatchWidth_complete:function(t){},onHideSubMenu_begin:function(t){},onHideSubMenu_complete:function(t){},onHideOtherSubMenus_begin:function(t){},onHideOtherSubMenus_complete:function(t){},onHideAllSubMenus_begin:function(t){},onHideAllSubMenus_complete:function(t){},onPositionSubMenu_begin:function(t){},onPositionSubMenu_complete:function(t){},onShowSubMenu_begin:function(t){},onShowSubMenu_complete:function(t){}},this.root=null,this.btn=null,this.hidden=!0,this.myEffect=null};e.prototype.matchWidth=function(){if(!this.widthMatched&&this.options.matchWidthMode&&"subsequent"!==this.subMenuType){if(0==this.btn.is("li"))var e=this.btn.parentsUntil("li").eq(0).outerWidth();else var e=this.btn.outerWidth();var n=e;t("li",t(this.childMenu)).each(function(e,i){var s=parseFloat(t(this.childMenu).getFirst().getStyle("borderLeftWidth"))+parseFloat(t(this.childMenu).getFirst().getStyle("borderRightWidth")),o=parseFloat(t(i).getStyle("paddingLeft"))+parseFloat(t(i).getStyle("paddingRight")),a=s+o;n>t(i).width()&&(t(i).css("width",n-a+1),t(i).css("margin-right",-s))}.bind(this)),this.width=this.childMenu.getFirst().width()+1,this.widthMatched=!0}},e.prototype.hideSubMenu=function(e){"closed"!==this.childMenu.data("status")&&(void 0==e&&("initial"==this.subMenuType?this.options.mmbClassName&&this.options.mmbFocusedClassName?t(this.btn).data("btnMorph")?t(this.btn).data("btnMorph"):this.btn.switchClass(this.options.mmbClassName,"",this.options.duration,this.options.physics,function(){t(this.btn).removeClass("mainMenuParentBtnFocused"),t(this.btn).addClass("mainMenuParentBtn")}.bind(this)):(t(this.btn).removeClass("mainMenuParentBtnFocused"),t(this.btn).addClass("mainMenuParentBtn")):(t(this.btn).removeClass("subMenuParentBtnFocused"),t(this.btn).addClass("subMenuParentBtn"))),this.options.effect&&"slide"===this.options.effect.toLowerCase()?"initial"==this.subMenuType&&"horizontal"===this.options.orientation&&"down"===this.options.direction.y?t(this.childMenu).getFirst().animate({marginTop:-this.height},{duration:this.options.duration,easing:this.options.physics,queue:!1,complete:function(){this.childMenu.css({left:0,display:"none",zIndex:-100})}.bind(this)}).bind(this):"initial"==this.subMenuType&&"horizontal"===this.options.orientation&&"up"===this.options.direction.y?t(this.childMenu).getFirst().animate({marginTop:this.height},{duration:this.options.duration,easing:this.options.physics,queue:!1,complete:function(){this.childMenu.css({left:0,display:"none",zIndex:-100})}.bind(this)}).bind(this):"right"===this.options.direction.x?t(this.childMenu).getFirst().animate({marginLeft:-this.width},{duration:this.options.duration,easing:this.options.physics,queue:!1,complete:function(){this.childMenu.css({left:0,display:"none",zIndex:-100})}.bind(this)}).bind(this):"left"===this.options.direction.x&&t(this.childMenu).getFirst().animate({marginLeft:this.width},{duration:this.options.duration,easing:this.options.physics,queue:!1,complete:function(){this.childMenu.css({left:0,display:"none",zIndex:-100})}.bind(this)}).bind(this):"fade"==this.options.effect?t(this.childMenu).getFirst().animate({opacity:0},{duration:this.options.duration,easing:this.options.physics,queue:!1,complete:function(){this.childMenu.css({left:0,display:"none",zIndex:-100})}.bind(this)}).bind(this):"slide & fade"==this.options.effect?"initial"==this.subMenuType&&"horizontal"===this.options.orientation&&"down"===this.options.direction.y?t(this.childMenu).getFirst().animate({marginTop:-this.height,opacity:0},{duration:this.options.duration,easing:this.options.physics,queue:!1,complete:function(){this.childMenu.css({left:0,display:"none",zIndex:-100})}.bind(this)}).bind(this):"initial"==this.subMenuType&&"horizontal"===this.options.orientation&&"up"===this.options.direction.y?t(this.childMenu).getFirst().animate({marginTop:this.height,opacity:0},{duration:this.options.duration,easing:this.options.physics,queue:!1,complete:function(){this.childMenu.css({left:0,display:"none",zIndex:-100})}.bind(this)}).bind(this):"right"===this.options.direction.x?t(this.childMenu).getFirst().animate({marginLeft:-this.width,opacity:0},{duration:this.options.duration,easing:this.options.physics,queue:!1,complete:function(){this.childMenu.css({left:0,display:"none",zIndex:-100})}.bind(this)}).bind(this):"left"===this.options.direction.x&&t(this.childMenu).getFirst().animate({marginLeft:this.width,opacity:0},{duration:this.options.duration,easing:this.options.physics,queue:!1,complete:function(){this.childMenu.css({left:0,display:"none",zIndex:-100})}.bind(this)}).bind(this):(this.childMenu[0].style.left="0px",this.childMenu[0].style.visiblity="hidden",this.childMenu.css("zIndex",-100)),this.childMenu.data("status","closed"))},e.prototype.hideOtherSubMenus=function(){this.btn.data("otherSubMenus")||this.btn.data("otherSubMenus",t(this.root.allSubMenus.filter(function(t){return-1==this.btn.data("parentSubMenus").index(t)&&t!=this.childMenu}.bind(this)))),this.parentSubMenus.fireEvents("show"),this.btn.data("otherSubMenus").fireEvents("hidex"),this.btn.data("otherSubMenus").each(function(e,n){t(n).data("parentMenu").data("menuOpened",!1)})},e.prototype.hideAllSubMenus=function(){clearTimeout(this.root.hideAllMenusTimeout),this.root.hideAllMenusTimeout=setTimeout(function(){clearTimeout(this.root.hideAllMenusTimeout),t(this.root.allSubMenus).fireEvents("hidex")}.bind(this),this.options.hideDelay)},e.prototype.cancellHideAllSubMenus=function(){clearTimeout(this.root.hideAllMenusTimeout),this.options.direction.x=this.options.olddirection.x},e.prototype.showSubMenu=function(){S5DisplayMenusTimeout=setTimeout(function(){this.S5showSubMenu()}.bind(this),this.options.displayDelay)},e.prototype.S5showSubMenu=function(e){if("open"!==this.childMenu.data("status")){if("initial"==this.subMenuType?(t(this.btn).removeClass("mainMenuParentBtn"),t(this.btn).addClass("mainMenuParentBtnFocused")):(t(this.btn).removeClass("subMenuParentBtn"),t(this.btn).addClass("subMenuParentBtnFocused")),this.root.subMenuZindex++,this.childMenu.css({display:"block",visibility:"hidden",zIndex:this.root.subMenuZindex}),this.height&&this.width||(this.height=this.childMenu.getFirst().outerHeight(),this.width=this.childMenu.getFirst().outerWidth(),("slide"===this.options.effect||"slide & fade"===this.options.effect)&&("initial"==this.subMenuType&&"horizontal"===this.options.orientation?(this.childMenu.getFirst().css("marginTop","0"),"down"===this.options.direction.y?t(this.childMenu).getFirst().css({marginTop:-this.height}):"up"===this.options.direction.y&&t(this.childMenu).getFirst().css({marginTop:this.height})):"left"===this.options.direction.x?t(this.childMenu).getFirst().css({marginLeft:this.width}):t(this.childMenu).getFirst().css({marginLeft:-this.width}))),this.matchWidth(),this.positionSubMenu(),"slide"===this.options.effect)if(this.childMenu.css({display:"block",visibility:"visible"}),"initial"===this.subMenuType&&"horizontal"===this.options.orientation){if(t("#"+this.options.id).offset().top!=t("#"+this.options.id).position().top&&t(this.childMenu).css("top",t(this.btn).offset().top+t(this.btn).outerHeight()-t(window).scrollTop()),document.getElementById("s5_menu_wrap")){var n="";document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode&&(n=document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode,s5_menu_wrap_parent4_style=window.getComputedStyle(n),s5_menu_wrap_parent4_top=s5_menu_wrap_parent4_style.getPropertyValue("position"));var i="";document.getElementById("s5_menu_wrap").parentNode.parentNode&&(i=document.getElementById("s5_menu_wrap").parentNode.parentNode,s5_menu_wrap_parent3_style=window.getComputedStyle(i),s5_menu_wrap_parent3_top=s5_menu_wrap_parent3_style.getPropertyValue("position"));var s="";document.getElementById("s5_menu_wrap").parentNode&&(s=document.getElementById("s5_menu_wrap").parentNode,s5_menu_wrap_parent2_style=window.getComputedStyle(s),s5_menu_wrap_parent2_top=s5_menu_wrap_parent2_style.getPropertyValue("position"));var o=document.getElementById("s5_menu_wrap"),a=window.getComputedStyle(o),r=a.getPropertyValue("position"),d="no",u="no",p="no",h="no",l="no",c="no";document.getElementById("s5_menu_wrap").className&&document.getElementById("s5_menu_wrap").className.indexOf("wrap_fmfullwidth")>=1&&(d="yes"),document.getElementById("s5_menu_wrap").parentNode&&document.getElementById("s5_menu_wrap").parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.className.indexOf("floating_header")>=1&&(u="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.className.indexOf("floating_header")>=1&&(p="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(h="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(l="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(c="yes"),"s5_wrap"!=document.getElementById("s5_menu_wrap").className&&"no"==d&&"no"==u&&"no"==p&&"no"==h&&"no"==l&&"no"==c&&"fixed"!=r&&"fixed"!=s5_menu_wrap_parent2_top&&"fixed"!=s5_menu_wrap_parent3_top&&"fixed"!=s5_menu_wrap_parent4_top&&t("#"+this.options.id).offset().top!=t("#"+this.options.id).position().top&&t(this.childMenu).css("top",t(this.btn).offset().top+t(this.btn).outerHeight())}e?t(this.childMenu).getFirst().stop().animate({marginTop:0},{duration:0,easing:this.options.physics,queue:!1,complete:function(){this.showSubMenuComplete()}.bind(this)}):t(this.childMenu).getFirst().stop().animate({marginTop:0},{duration:this.options.duration,queue:!1,easing:this.options.physics,complete:function(){this.showSubMenuComplete()}.bind(this)})}else{if("subsequent"===this.subMenuType&&"horizontal"===this.options.orientation&&(t("#"+this.options.id).offset().top!=t("#"+this.options.id).position().top&&t(this.childMenu).css("top",t(this.btn).offset().top-t(window).scrollTop()),document.getElementById("s5_menu_wrap"))){var n="";document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode&&(n=document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode,s5_menu_wrap_parent4_style=window.getComputedStyle(n),s5_menu_wrap_parent4_top=s5_menu_wrap_parent4_style.getPropertyValue("position"));var i="";document.getElementById("s5_menu_wrap").parentNode.parentNode&&(i=document.getElementById("s5_menu_wrap").parentNode.parentNode,s5_menu_wrap_parent3_style=window.getComputedStyle(i),s5_menu_wrap_parent3_top=s5_menu_wrap_parent3_style.getPropertyValue("position"));var s="";document.getElementById("s5_menu_wrap").parentNode&&(s=document.getElementById("s5_menu_wrap").parentNode,s5_menu_wrap_parent2_style=window.getComputedStyle(s),s5_menu_wrap_parent2_top=s5_menu_wrap_parent2_style.getPropertyValue("position"));var o=document.getElementById("s5_menu_wrap"),a=window.getComputedStyle(o),r=a.getPropertyValue("position"),d="no",u="no",p="no",h="no",l="no",c="no";document.getElementById("s5_menu_wrap").className&&document.getElementById("s5_menu_wrap").className.indexOf("wrap_fmfullwidth")>=1&&(d="yes"),document.getElementById("s5_menu_wrap").parentNode&&document.getElementById("s5_menu_wrap").parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.className.indexOf("floating_header")>=1&&(u="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.className.indexOf("floating_header")>=1&&(p="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(h="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(l="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(c="yes"),"s5_wrap"!=document.getElementById("s5_menu_wrap").className&&"no"==d&&"no"==u&&"no"==p&&"no"==h&&"no"==l&&"no"==c&&"fixed"!=r&&"fixed"!=s5_menu_wrap_parent2_top&&"fixed"!=s5_menu_wrap_parent3_top&&"fixed"!=s5_menu_wrap_parent4_top&&t("#"+this.options.id).offset().top!=t("#"+this.options.id).position().top&&t(this.childMenu).css("top",t(this.btn).offset().top)}e?t(this.childMenu).getFirst().stop().animate({marginLeft:0},{duration:0,easing:this.options.physics,queue:!1,complete:function(){this.showSubMenuComplete()}.bind(this)}):t(this.childMenu).getFirst().stop().animate({marginLeft:0},{duration:this.options.duration,easing:this.options.physics,queue:!1,complete:function(){this.showSubMenuComplete()}.bind(this)})}else if("fade"===this.options.effect){if("initial"===this.subMenuType&&"horizontal"===this.options.orientation&&(t("#"+this.options.id).offset().top!=t("#"+this.options.id).position().top&&t(this.childMenu).css("top",t(this.btn).offset().top+t(this.btn).outerHeight()-t(window).scrollTop()),document.getElementById("s5_menu_wrap"))){var n="";document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode&&(n=document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode,s5_menu_wrap_parent4_style=window.getComputedStyle(n),s5_menu_wrap_parent4_top=s5_menu_wrap_parent4_style.getPropertyValue("position"));var i="";document.getElementById("s5_menu_wrap").parentNode.parentNode&&(i=document.getElementById("s5_menu_wrap").parentNode.parentNode,s5_menu_wrap_parent3_style=window.getComputedStyle(i),s5_menu_wrap_parent3_top=s5_menu_wrap_parent3_style.getPropertyValue("position"));var s="";document.getElementById("s5_menu_wrap").parentNode&&(s=document.getElementById("s5_menu_wrap").parentNode,s5_menu_wrap_parent2_style=window.getComputedStyle(s),s5_menu_wrap_parent2_top=s5_menu_wrap_parent2_style.getPropertyValue("position"));var o=document.getElementById("s5_menu_wrap"),a=window.getComputedStyle(o),r=a.getPropertyValue("position"),d="no",u="no",p="no",h="no",l="no",c="no";document.getElementById("s5_menu_wrap").className&&document.getElementById("s5_menu_wrap").className.indexOf("wrap_fmfullwidth")>=1&&(d="yes"),document.getElementById("s5_menu_wrap").parentNode&&document.getElementById("s5_menu_wrap").parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.className.indexOf("floating_header")>=1&&(u="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.className.indexOf("floating_header")>=1&&(p="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(h="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(l="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(c="yes"), "s5_wrap"!=document.getElementById("s5_menu_wrap").className&&"no"==d&&"no"==u&&"no"==p&&"no"==h&&"no"==l&&"no"==c&&"fixed"!=r&&"fixed"!=s5_menu_wrap_parent2_top&&"fixed"!=s5_menu_wrap_parent3_top&&"fixed"!=s5_menu_wrap_parent4_top&&t("#"+this.options.id).offset().top!=t("#"+this.options.id).position().top&&t(this.childMenu).css("top",t(this.btn).offset().top+t(this.btn).outerHeight())}if(this.childMenu.css({display:"block",visibility:"visible"}),e?t(this.childMenu).getFirst().stop().animate({opacity:this.options.opacity},{duration:0,easing:this.options.physics,queue:!1,complete:function(){this.showSubMenuComplete()}.bind(this)}):t(this.childMenu).getFirst().stop().animate({opacity:this.options.opacity},{duration:this.options.duration,easing:this.options.physics,queue:!1,complete:function(){this.showSubMenuComplete()}.bind(this)}),"subsequent"===this.subMenuType&&"horizontal"===this.options.orientation&&(t("#"+this.options.id).offset().top!=t("#"+this.options.id).position().top&&t(this.childMenu).css("top",t(this.btn).offset().top-t(window).scrollTop()),document.getElementById("s5_menu_wrap"))){var n="";document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode&&(n=document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode,s5_menu_wrap_parent4_style=window.getComputedStyle(n),s5_menu_wrap_parent4_top=s5_menu_wrap_parent4_style.getPropertyValue("position"));var i="";document.getElementById("s5_menu_wrap").parentNode.parentNode&&(i=document.getElementById("s5_menu_wrap").parentNode.parentNode,s5_menu_wrap_parent3_style=window.getComputedStyle(i),s5_menu_wrap_parent3_top=s5_menu_wrap_parent3_style.getPropertyValue("position"));var s="";document.getElementById("s5_menu_wrap").parentNode&&(s=document.getElementById("s5_menu_wrap").parentNode,s5_menu_wrap_parent2_style=window.getComputedStyle(s),s5_menu_wrap_parent2_top=s5_menu_wrap_parent2_style.getPropertyValue("position"));var o=document.getElementById("s5_menu_wrap"),a=window.getComputedStyle(o),r=a.getPropertyValue("position"),d="no",u="no",p="no",h="no",l="no",c="no";document.getElementById("s5_menu_wrap").className&&document.getElementById("s5_menu_wrap").className.indexOf("wrap_fmfullwidth")>=1&&(d="yes"),document.getElementById("s5_menu_wrap").parentNode&&document.getElementById("s5_menu_wrap").parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.className.indexOf("floating_header")>=1&&(u="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.className.indexOf("floating_header")>=1&&(p="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(h="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(l="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(c="yes"),"s5_wrap"!=document.getElementById("s5_menu_wrap").className&&"no"==d&&"no"==u&&"no"==p&&"no"==h&&"no"==l&&"no"==c&&"fixed"!=r&&"fixed"!=s5_menu_wrap_parent2_top&&"fixed"!=s5_menu_wrap_parent3_top&&"fixed"!=s5_menu_wrap_parent4_top&&t("#"+this.options.id).offset().top!=t("#"+this.options.id).position().top&&t(this.childMenu).css("top",t(this.btn).offset().top)}}else if("slide & fade"==this.options.effect)if(this.childMenu.css({display:"block",visibility:"visible"}),this.childMenu.getFirst().css({left:0}),"initial"===this.subMenuType&&"horizontal"===this.options.orientation){if(t("#"+this.options.id).offset().top!=t("#"+this.options.id).position().top&&t(this.childMenu).css("top",t(this.btn).offset().top+t(this.btn).outerHeight()-t(window).scrollTop()),document.getElementById("s5_menu_wrap")){var n="";document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode&&(n=document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode,s5_menu_wrap_parent4_style=window.getComputedStyle(n),s5_menu_wrap_parent4_top=s5_menu_wrap_parent4_style.getPropertyValue("position"));var i="";document.getElementById("s5_menu_wrap").parentNode.parentNode&&(i=document.getElementById("s5_menu_wrap").parentNode.parentNode,s5_menu_wrap_parent3_style=window.getComputedStyle(i),s5_menu_wrap_parent3_top=s5_menu_wrap_parent3_style.getPropertyValue("position"));var s="";document.getElementById("s5_menu_wrap").parentNode&&(s=document.getElementById("s5_menu_wrap").parentNode,s5_menu_wrap_parent2_style=window.getComputedStyle(s),s5_menu_wrap_parent2_top=s5_menu_wrap_parent2_style.getPropertyValue("position"));var o=document.getElementById("s5_menu_wrap"),a=window.getComputedStyle(o),r=a.getPropertyValue("position"),d="no",u="no",p="no",h="no",l="no",c="no";document.getElementById("s5_menu_wrap").className&&document.getElementById("s5_menu_wrap").className.indexOf("wrap_fmfullwidth")>=1&&(d="yes"),document.getElementById("s5_menu_wrap").parentNode&&document.getElementById("s5_menu_wrap").parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.className.indexOf("floating_header")>=1&&(u="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.className.indexOf("floating_header")>=1&&(p="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(h="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(l="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(c="yes"),"s5_wrap"!=document.getElementById("s5_menu_wrap").className&&"no"==d&&"no"==u&&"no"==p&&"no"==h&&"no"==l&&"no"==c&&"fixed"!=r&&"fixed"!=s5_menu_wrap_parent2_top&&"fixed"!=s5_menu_wrap_parent3_top&&"fixed"!=s5_menu_wrap_parent4_top&&t("#"+this.options.id).offset().top!=t("#"+this.options.id).position().top&&t(this.childMenu).css("top",t(this.btn).offset().top+t(this.btn).outerHeight())}e?t(this.childMenu).getFirst().stop().animate({marginTop:0,opacity:this.options.opacity},{duration:0,queue:!1,easing:this.options.physics,complete:function(){this.showSubMenuComplete()}.bind(this)}):t(this.childMenu).getFirst().stop().animate({marginTop:0,opacity:this.options.opacity},{duration:this.options.duration,queue:!1,easing:this.options.physics,complete:function(){this.showSubMenuComplete()}.bind(this)})}else{if("subsequent"===this.subMenuType&&"horizontal"===this.options.orientation&&(t("#"+this.options.id).offset().top!=t("#"+this.options.id).position().top&&t(this.childMenu).css("top",t(this.btn).offset().top-t(window).scrollTop()),document.getElementById("s5_menu_wrap"))){var n="";document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode&&(n=document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode,s5_menu_wrap_parent4_style=window.getComputedStyle(n),s5_menu_wrap_parent4_top=s5_menu_wrap_parent4_style.getPropertyValue("position"));var i="";document.getElementById("s5_menu_wrap").parentNode.parentNode&&(i=document.getElementById("s5_menu_wrap").parentNode.parentNode,s5_menu_wrap_parent3_style=window.getComputedStyle(i),s5_menu_wrap_parent3_top=s5_menu_wrap_parent3_style.getPropertyValue("position"));var s="";document.getElementById("s5_menu_wrap").parentNode&&(s=document.getElementById("s5_menu_wrap").parentNode,s5_menu_wrap_parent2_style=window.getComputedStyle(s),s5_menu_wrap_parent2_top=s5_menu_wrap_parent2_style.getPropertyValue("position"));var o=document.getElementById("s5_menu_wrap"),a=window.getComputedStyle(o),r=a.getPropertyValue("position"),d="no",u="no",p="no",h="no",l="no",c="no";document.getElementById("s5_menu_wrap").className&&document.getElementById("s5_menu_wrap").className.indexOf("wrap_fmfullwidth")>=1&&(d="yes"),document.getElementById("s5_menu_wrap").parentNode&&document.getElementById("s5_menu_wrap").parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.className.indexOf("floating_header")>=1&&(u="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.className.indexOf("floating_header")>=1&&(p="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(h="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(l="yes"),document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode.className&&document.getElementById("s5_menu_wrap").parentNode.parentNode.parentNode.parentNode.parentNode.className.indexOf("floating_header")>=1&&(c="yes"),"s5_wrap"!=document.getElementById("s5_menu_wrap").className&&"no"==d&&"no"==u&&"no"==p&&"no"==h&&"no"==l&&"no"==c&&"fixed"!=r&&"fixed"!=s5_menu_wrap_parent2_top&&"fixed"!=s5_menu_wrap_parent3_top&&"fixed"!=s5_menu_wrap_parent4_top&&t("#"+this.options.id).offset().top!=t("#"+this.options.id).position().top&&t(this.childMenu).css("top",t(this.btn).offset().top)}e?"right"===this.options.direction.x?t(this.childMenu).getFirst().stop().animate({marginLeft:0,opacity:this.options.opacity},{duration:0,easing:this.options.physics,queue:!1,complete:function(){this.showSubMenuComplete()}.bind(this)}):"left"===this.options.direction.x&&t(this.childMenu).getFirst().stop().animate({marginLeft:0,opacity:this.options.opacity},{duration:0,easing:this.options.physics,queue:!1,complete:function(){this.showSubMenuComplete()}.bind(this)}):"right"===this.options.direction.x?(t(this.childMenu).getFirst().css("marginLeft",-this.width),t(this.childMenu).getFirst().stop().animate({marginLeft:0,opacity:this.options.opacity},{duration:this.options.duration,easing:this.options.physics,queue:!1,complete:function(){this.showSubMenuComplete()}.bind(this)})):"left"===this.options.direction.x&&t(this.childMenu).getFirst().stop().animate({marginLeft:0,opacity:this.options.opacity},{duration:this.options.duration,easing:this.options.physics,queue:!1,complete:function(){this.showSubMenuComplete()}.bind(this)})}else this.childMenu.stop().animate({display:"block",visibility:"visible"},{duration:0,easing:this.options.physics,queue:!1,complete:function(){this.showSubMenuComplete()}.bind(this)});this.childMenu.data("status","open")}},e.prototype.showSubMenuComplete=function(){if(this.options.olddirection.x&&(this.options.direction.x=this.options.olddirection.x),parseInt(this.childMenu[0].style.top)!=this.btn.offset().top&&this.btn.offset().top!=t("#"+this.options.id).offset().top&&0==parseInt(this.btn.css("marginTop"))&&0!=t("#"+this.options.id)[0].offsetTop)if("initial"==this.btn.data("subMenuType")){if("horizontal"==this.options.orientation)if(0==this.btn.is("li"))var e=this.btn.parentsUntil("li").eq(0).outerHeight();else var e=this.btn.outerHeight();else var e=this.btn.offset().top+this.btn.outerHeight();e-=this.subtractScrollTop(),t(this.childMenu).animate({top:e},this.options.duration,this.options.physics)}else{var n=this.btn.offset().top-this.subtractScrollTop();t(this.childMenu).animate({top:n},this.options.duration,this.options.physics)}},e.prototype.positionSubMenu=function(){this.childMenu.css("width",this.width);var e=this.childMenu.getFirst(),n=e.getFirst(),i=n.find("ul"),s=0;i.each(function(t,e){s+=e.offsetWidth}),this.childMenu.getFirst().css("width",s+1),this.childMenu.css("width",s+1),("s5_sub_wrap_rtl"==this.btn.parents("div").className||"s5_sub_wrap_lower_rtl"==this.btn.parents("div").className)&&(this.childMenu.className="s5_sub_wrap_lower_rtl"),"subsequent"===this.subMenuType&&(this.parentSubMenu&&this.options.direction.x!=this.parentSubMenu.options.direction.x&&"left"===this.parentSubMenu.options.direction.x&&this.options.effect&&this.options.effect.contains("slide")&&t(this.childMenu).getFirst().css({marginLeft:this.width}),this.options.direction.x=this.parentSubMenu.options.direction.x,this.options.direction.xInverse=this.parentSubMenu.options.direction.xInverse,this.options.direction.y=this.parentSubMenu.options.direction.y,this.options.direction.yInverse=this.parentSubMenu.options.direction.yInverse);var o,a;if("initial"==this.subMenuType){if("up"===this.options.direction.y){if("vertical"===this.options.orientation){if(0==this.btn.is("li"))var r=this.btn.parentsUntil("li").eq(0).outerHeight();else var r=this.btn.outerHeight();o=this.btn.offset().top-this.subtractScrollTop()+r-this.height+this.options.tweakInitial.y}else o=this.btn.offset().top-this.subtractScrollTop()-this.height+this.options.tweakInitial.y;this.childMenu[0].style.top=o+"px"}else if("horizontal"==this.options.orientation){if(0==this.btn.is("li"))var r=this.btn.parentsUntil("li").eq(0).outerHeight();else var r=this.btn.outerHeight();this.childMenu[0].style.top=this.btn.offset().top-this.subtractScrollTop()+r+this.options.tweakInitial.y+"px"}else"vertical"==this.options.orientation&&(o=this.btn.offset().top-this.subtractScrollTop()+this.options.tweakInitial.y,o+=this.btn.outerHeight(),this.childMenu[0].style.top=o+"px");if("horizontal"==this.options.orientation){var d=this.childMenu.outerWidth(),u=this.btn.offset().left;if(0==this.btn.is("li"))var p=this.btn.parentsUntil("li").eq(0).outerWidth();else var p=this.btn.outerWidth();var h=t(window).width();if("left"==this.options.direction.x)0>u-d?(this.btn.offset().left-d+p<0&&this.btn.offset().left+d>h?(this.childMenu[0].style.width=this.root.getWidth(),this.childMenu[0].style.cssFloat="auto"==this.childMenu[0].style.width?"left":"none",this.childMenu.children().each(function(e,n){t(n).css({"float":"none",width:"auto"}),t(n).children().each(function(e,n){t(n).children().each(function(e,n){t(n).css({"float":"none"})})})})):(this.childMenu[0].style.width=this.root.getWidth(),this.childMenu[0].style.cssFloat="auto"==this.childMenu[0].style.width?"left":"none",this.childMenu.css({clear:"none"}),this.childMenu.children().each(function(e,n){t(n).css({"float":"left",width:"auto",clear:"none"}).children().each(function(e,n){t(n).children().each(function(e,n){t(n).css({"float":"left",clear:"none"})})})})),d=t(this.childMenu).outerWidth(),this.btn.offset().left-d+p<20?(l=this.btn.offset().left,need=1,l-=24):(l=this.btn.offset().left-d+p,need=0),this.childMenu[0].style.left=l+"px",need?this.childMenu.className="s5_sub_wrap_rtl":this.childMenu.className="s5_sub_wrap"):(this.childMenu[0].style.width=this.root.getWidth(),this.childMenu[0].style.cssFloat="auto"==this.childMenu[0].style.width?"left":"none",this.childMenu.css({clear:"none"}),this.childMenu.children().each(function(e,n){t(n).css({width:"auto","float":"left",clear:"none"}).children().each(function(e,n){t(n).children().each(function(e,n){t(n).css({"float":"left",clear:"none"})})})}),this.childMenu[0].className="s5_sub_wrap",this.childMenu[0].style.marginLeft="5px",d=this.childMenu.outerWidth(),this.childMenu[0].style.left=this.btn.offset().left-d+p+"px");else if(d+u>h){if(this.btn.offset().left-d+p<0?(this.childMenu[0].style.width=this.root.getWidth(),this.childMenu[0].style.cssFloat="auto"==this.childMenu[0].style.width?"left":"none",this.childMenu.children().each(function(e,n){t(n).css({width:"auto","float":"none"}).children().each(function(e,n){t(n).children().each(function(e,n){t(n).css("float","none")})})}),this.childMenu.className="s5_sub_wrap_rtl"):(this.childMenu[0].style.width=this.root.getWidth(),this.childMenu[0].style.cssFloat="auto"==this.childMenu[0].style.width?"left":"none",this.childMenu.css({clear:"none"}),this.childMenu.children().each(function(e,n){t(n).css({"float":"left",width:"auto",clear:"none"}).children().each(function(e,n){t(n).children().each(function(e,n){t(n).css({"float":"left",clear:"none"})})})})),d=this.childMenu.width(),d+this.btn.offset().leftl&&(l=this.btn.offset().left)}this.childMenu[0].style.left=l+"px",d+this.btn.offset().left=t(document.body).scrollTop()?(a=this.btn.offset().top-this.subtractScrollTop()+this.options.tweakSubsequent.y+this.childMenu.height(),this.childMenu[0].style.top=this.btn.offset().top-this.subtractScrollTop()+this.options.tweakSubsequent.y-a-20+"px"):this.childMenu[0].style.top=this.btn.offset().top-this.subtractScrollTop()+this.options.tweakSubsequent.y+"px";else if("up"===this.options.direction.y){if(0==this.btn.is("li"))var r=this.btn.parentsUntil("li").eq(0).outerHeight();else var r=this.btn.outerHeight();if(this.btn.offset().top+r-this.subtractScrollTop()-this.height+this.options.tweakSubsequent.y<1)this.options.direction.y="down",this.options.direction.yInverse="up",this.childMenu[0].style.top=this.btn.offset().top-this.subtractScrollTop()+this.options.tweakSubsequent.y+"px";else{if(0==this.btn.is("li"))var r=this.btn.parentsUntil("li").eq(0).outerHeight();else var r=this.btn.outerHeight();this.childMenu[0].style.top=this.btn.offset().top-this.subtractScrollTop()+r-this.height+this.options.tweakSubsequent.y+"px"}}if("left"==this.options.direction.x){if(this.childMenu[0].style.left=this.btn.offset().left-this.childMenu.width()+this.options.tweakSubsequent.x+"px",this.childMenu[0].style.top=this.btn.offset().top-this.subtractScrollTop()+this.options.tweakSubsequent.x+"px",this.childMenu.offset().left<20){if(this.options.olddirection.x=this.options.direction.x,this.options.direction.x="right",this.options.direction.xInverse="left",0==this.btn.is("li"))var c=this.btn.parentsUntil("li").eq(0).outerWidth();else var c=this.btn.outerWidth();this.childMenu[0].style.left=this.btn.offset().left+c+this.options.tweakSubsequent.x+"px",this.childMenu.className="s5_sub_wrap_lower_rtl",("slide"===this.options.effect||"slide & fade"===this.options.effect)&&t(this.childMenu).getFirst().css({marginLeft:-this.width,opacity:this.options.opacity})}}else if("right"==this.options.direction.x){if(0==this.btn.is("li"))var c=this.btn.parentsUntil("li").eq(0).outerWidth();else var c=this.btn.outerWidth();this.childMenu[0].style.top=this.btn.offset().top-this.subtractScrollTop()+this.options.tweakSubsequent.x+"px",this.childMenu[0].style.left=this.btn.offset().left+c+this.options.tweakSubsequent.x+"px";var m=this.childMenu.offset().left+this.childMenu.width(),f=t(window).width()+t(window).scrollLeft()-20;if(m>f){this.options.olddirection.x=this.options.direction.x,this.options.direction.x="left",this.options.direction.xInverse="right";var d=this.childMenu.outerWidth(),u=this.btn.offset().left,h=t(window).width();h>=2*d+u?this.childMenu[0].style.right=this.btn.offset().left+this.options.tweakSubsequent.x+"px":(this.childMenu[0].style.left=this.btn.offset().left-this.childMenu.width()+this.options.tweakSubsequent.x+"px",this.childMenu.className="s5_sub_wrap_lower_rtl"),("slide"===this.options.effect||"slide & fade"===this.options.effect)&&t(this.childMenu).getFirst().css({marginLeft:this.width,opacity:this.options.opacity})}}}},e.prototype.subtractScrollTop=function(){return t("#"+this.options.id).offset().top!=t("#"+this.options.id).position().top?t(window).scrollTop():0},e.prototype.initialize=function(e,n,i,s){if(this.options=t.extend(e,this.options),this.root=n,this.btn=i,this.childMenu=t(this.btn).data("childMenu"),this.childMenu){this.subMenuType=this.btn.data("subMenuType"),this.parentSubMenus=t(this.btn.data("parentSubMenus")),this.parentLinks=this.btn.data("parentLinks"),this.parentSubMenus?this.parentSubMenu=t(this.parentSubMenus[0]):this.parentSubMenu=null,this.parentSubMenu&&(this.parentSubMenu=this.parentSubMenu.data("class")),this.childMenu.data("class",this),this.btn.data("class",this),this.childMenu.data("status","closed"),this.childMenu.bind("hidex",function(){this.hideSubMenu()}.bind(this)),this.childMenu.bind("show",function(){this.showSubMenu()}.bind(this)),this.options.effect,"slide"===this.options.effect||"slide & fade"===this.options.effect?"initial"==this.subMenuType&&"horizontal"===this.options.orientation?this.childMenu.getFirst().css("marginTop","0"):this.childMenu.getFirst().css("marginLeft","0"):("fade"===this.options.effect||"slide & fade"===this.options.effect)&&this.childMenu.getFirst().css("opacity",0),"fade"!=this.options.effect&&"slide & fade"!=this.options.effect&&this.childMenu.getFirst().css("opacity",this.options.opacity),this.childMenu.getFirst().css("float","left");var o=t("#li_child_"+s+" ul");o.each(function(e,n){var i=t("li",t(n)).filter(function(e,n){return!t(n).data("childMenu")});i.each(function(e,n){t(n).addClass("subMenuBtn"),t(n).bind("mouseenter",function(t){this.childMenu.trigger("show"),this.cancellHideAllSubMenus(),this.hideOtherSubMenus()}.bind(this)),t(n).parentsUntil("div").parent().bind("mouseenter",function(t){this.cancellHideAllSubMenus()}.bind(this)),t(n).data("mouseenterH",function(t){this.childMenu.trigger("show"),this.cancellHideAllSubMenus(),this.hideOtherSubMenus()}.bind(this)),t(n).bind("focus",function(t){this.childMenu.trigger("show"),this.cancellHideAllSubMenus(),this.hideOtherSubMenus()}.bind(this)),t(n).bind("mouseleave",function(t){this.cancellHideAllSubMenus()}.bind(this)),t(n).data("mouseleaveH",function(t){this.cancellHideAllSubMenus(),this.hideAllSubMenus()}.bind(this)),t(n).bind("blur",function(t){this.cancellHideAllSubMenus(),this.hideAllSubMenus()}.bind(this)),t(n).bind("keydown",function(e){new Event(e);("up"===e.key||"down"===e.key||"left"===e.key||"right"===e.key||"tab"===e.key)&&e.stop(),"up"===e.key?t(n).parents("li").getPrevious("li")?t(n).parents("li").getPrevious("li").getFirst("a").focus():"down"===this.options.direction.y?this.btn.focus():"up"===this.options.direction.y&&t(n).parents("li").parent().getLast("li").getFirst("a").focus():"down"===e.key?t(n).parents("li").getNext("li")?t(n).parents("li").getNext("li").getFirst("a").focus():"down"===this.options.direction.y?t(n).parents("li").parent().getFirst("li").getFirst("a").focus():"up"===this.options.direction.y&&this.btn.focus():e.key===this.options.direction.xInverse&&this.btn.focus()}.bind(this))}.bind(this))}.bind(this)),this.btn.removeClass("subMenuBtn"),"initial"==this.subMenuType?this.btn.addClass("mainParentBtn"):this.btn.addClass("subParentBtn"),this.btn.bind("mouseenter",function(e){e.preventDefault(),this.cancellHideAllSubMenus(),this.hideOtherSubMenus(),setTimeout(function(){this.showSubMenu()}.bind(this),10),"initial"===this.subMenuType&&this.options.mmbClassName&&this.options.mmbFocusedClassName&&(t(this.btn).data("btnMorph")?t(this.btn).data("btnMorph"):this.btn.switchClass(this.options.mmbFocusedClassName,"",this.options.duration/2,this.options.physics))}.bind(this)).data("mouseenterH",function(e){e.preventDefault(),this.cancellHideAllSubMenus(),this.hideOtherSubMenus(),setTimeout(function(){this.showSubMenu()}.bind(this),10),"initial"===this.subMenuType&&this.options.mmbClassName&&this.options.mmbFocusedClassName&&(t(this.btn).data("btnMorph")?t(this.btn).data("btnMorph"):this.btn.switchClass(this.options.mmbFocusedClassName,"",this.options.duration/2,this.options.physics))}.bind(this)),this.btn.bind("focus",function(e){e.preventDefault(),this.cancellHideAllSubMenus(),this.hideOtherSubMenus(),this.showSubMenu(),"initial"===this.subMenuType&&this.options.mmbClassName&&this.options.mmbFocusedClassName&&(t(this.btn).data("btnMorph")?t(this.btn).data("btnMorph"):this.btn.switchClass(this.options.mmbFocusedClassName,"",this.options.duration/2,this.options.physics))}.bind(this)),this.btn.data("childMenu").bind("mouseleave",function(t){t.preventDefault(),this.cancellHideAllSubMenus(),this.hideAllSubMenus()}.bind(this)).data("mouseleaveHander",function(t){t.preventDefault(),this.cancellHideAllSubMenus(),this.hideAllSubMenus()}.bind(this)),this.btn.bind("mouseleave",function(t){t.preventDefault(),this.cancellHideAllSubMenus(),this.hideAllSubMenus()}.bind(this)).data("mouseleaveHander",function(t){t.preventDefault(),this.cancellHideAllSubMenus(),this.hideAllSubMenus()}.bind(this)),this.btn.bind("blur",function(t){t.preventDefault(),this.cancellHideAllSubMenus(),this.hideAllSubMenus()}.bind(this)),this.btn.bind("keydown",function(t){t=new Event(t),("up"===t.key||"down"===t.key||"left"===t.key||"right"===t.key)&&t.stop(),this.parentSubMenu?("tab"===t.key&&t.stop(),"up"===t.key?this.btn.parents("li").getPrevious("li")?this.btn.parents("li").getPrevious("li").getFirst("a").focus():"down"===this.options.direction.y?this.parentSubMenu.btn.focus():"up"===this.options.direction.y&&this.btn.parents("li").parent().getLast("li").getFirst("a").focus():"down"===t.key?this.btn.parents("li").getNext("li")?this.btn.parents("li").getNext("li").getFirst("a").focus():"down"===this.options.direction.y?this.btn.parents("li").parent().getFirst("li").getFirst("a").focus():"up"===this.options.direction.y&&this.parentSubMenu.btn.focus():t.key===this.options.direction.xInverse?this.parentSubMenu.btn.focus():t.key===this.options.direction.x&&("down"===this.options.direction.y?this.childMenu.getFirst().getFirst("li").getFirst("a").focus():"up"===this.options.direction.y)):"horizontal"===this.options.orientation&&t.key===this.options.direction.y||"vertical"===this.options.orientation&&t.key===this.options.direction.x?"down"===this.options.direction.y?this.childMenu.getFirst().getFirst("li").getFirst("a").focus():"up"===this.options.direction.y&&this.childMenu.getFirst().getLast("li").getFirst("a").focus():"horizontal"===this.options.orientation&&"left"===t.key||"vertical"===this.options.orientation&&t.key===this.options.direction.yInverse?this.btn.parent().getPrevious()?this.btn.parent().getPrevious().getFirst().focus():this.btn.parent().parent().getLast().getFirst().focus():("horizontal"===this.options.orientation&&"right"===t.key||"vertical"===this.options.orientation&&t.key===this.options.direction.y)&&(this.btn.parent().getNext()?this.btn.parent().getNext().getFirst().focus():this.btn.parent().parent().getFirst().getFirst().focus())}.bind(this))}}}(jQuery),window.onload=s5_create_separator_class; // source --> https://kamith.org/wp-content/themes/s5_prestige_academy/js/multibox/overlay.js if(undefined == Function.prototype.bind){ Function.prototype.bind=function(that){ var self = this, args = arguments.length > 1 ? Array.slice(arguments, 1) : null, F = function(){}; var bound = function(){ var context = that, length = arguments.length; if (this instanceof bound){ F.prototype = self.prototype; context = new F; } var result = (!args && !length) ? self.call(context) : self.apply(context, args && length ? args.concat(Array.slice(arguments)) : args || arguments); return context == that ? result : context; }; return bound; } } /************************************************************** Script : Overlay Version : 2.0.4 Authors : Samuel Birch Desc : Covers the window with a semi-transparent layer. Licence : Open Source MIT Licence Modified : Liam Smart (liam_smart@hotmail.com) - MooTools 1.2 upgrade **************************************************************/ (function($){ //start overlay class window.Overlay = function(options){ //options this.options=$.extend({ colour: '#000',//background color of overlay opacity: 0.7,//opacity of overlay zIndex: -1,//the z-index of the overlay (needs to lower than multiBox pop-up) onClick: function(){}//make sure new class is loaded },options); //start building overlay this.container=$('
    ').css({ 'position':'absolute','left':0,'height':'100%', 'top':0,'width':'100%','opacity':0, 'overflow':'hidden','background':'black', 'zIndex':this.options.zIndex,'opacity':0 }).appendTo(this.options.container).click(this.options.onClick); } //initialization Overlay.prototype.initialize=function(options){ this.container.css('zIndex',100); //set options this.options=$.extend($this.options,options); this.iframe=$('').css( {'position':'asbolute','top':0,'left':0,'width':'100%','height':'100%', 'filter':'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)', 'opacity':0,'zIndex':101 }).appendTo(this.container); this.overlay = $('
    ').css({ 'position':'asbolute','top':0,'left':0,'width':'100%','height':'100%','zIndex':102,'backgroundColor':this.options.colour }).appendTo(this.container); this.container.addEvent('click', $.proxy(function(){ this.options.onClick(); },this)); this.position(); //make sure overlay is resized when browser is $(window).addEvent('resize',$.proxy(this.position,this)); }, Overlay.prototype.position=function(){ if(this.options.container == document.body){ this.container.setStyles({ height: $(window).scrollTop(), width: $(window).scrollLeft() }); }else{ this.container.setStyles({ top: this.options.container.offset().top, height: this.options.container.height(), left: this.options.container.offset().left, width: this.options.container.width() }); } }; Overlay.prototype.show= function(){ this.container.css({'zIndex':100,'visibility':'visible'}); // console.log(this.container); jQuery('#s5_body_padding').addClass('s5_blurred'); this.container.animate({ 'opacity': this.options.opacity },'slow','easeOutExpo',(function(){ //this.container.css({'visibility': 'visible'}); }).bind(this)); }; Overlay.prototype.hide= function(){ jQuery('#s5_body_padding').removeClass('s5_blurred'); this.container.animate({ display: 'none', opacity: 0 },'slow','easeOutExpo',(function() { this.container.css({'visibility': 'hidden'}); this.container.css('zIndex',-1); }).bind(this)); }; })(jQuery); function s5_resize_overlay() { if (document.getElementById("OverlayContainer")) { document.getElementById("OverlayContainer").style.height = document.body.offsetHeight + "px"; document.getElementById("OverlayContainer").style.width = document.body.offsetWidth + "px"; } } jQuery(window).bind('resize',function(){s5_resize_overlay();}); // source --> https://kamith.org/wp-content/themes/s5_prestige_academy/js/multibox/multibox.js if(!Array.prototype.from ) Array.prototype.from = function(item){ if (item == null) return []; return (typeof(item) == 'array') ? item : [item]; }; Function.prototype.passx=function(args, bind){ var self = this; if (args != null) args = Array.prototype.from(args); return function(){ return self.apply(bind, args || arguments); }; }; if ( !Array.prototype.forEach ) { Array.prototype.forEach = function(fn, scope) { for(var i = 0, len = this.length; i < len; ++i) { fn.call(scope || this, this[i], i, this); } } } if(undefined == Function.prototype.bind){ Function.prototype.bind=function(that){ var self = this, args = arguments.length > 1 ? Array.slice(arguments, 1) : null, F = function(){}; var bound = function(){ var context = that, length = arguments.length; if (this instanceof bound){ F.prototype = self.prototype; context = new F; } var result = (!args && !length) ? self.call(context) : self.apply(context, args && length ? args.concat(Array.slice(arguments)) : args || arguments); return context == that ? result : context; }; return bound; } } if(!String.prototype.contains) String.prototype.contains=function(n){return this.indexOf(n)>-1;}; if(!Array.prototype.contains) Array.prototype.contains=function(n){return this.indexOf(n)>-1;}; var Eventx = { addEvent:function(elem, type, func){ if (document.addEventListener) { elem.addEventListener(type, func, false); } else { elem.attachEvent('on' + type, func); } }, onResizend:function(onResizend){ var actionState = 'normal', taskPtr = null, timeOutTask = function(){ taskPtr && clearTimeout(taskPtr); taskPtr = setTimeout(function(){ onResizend && onResizend(); actionState = 'normal'; },500) }; this.addEvent( window, 'resize', function(){ actionState = 'resizing'; timeOutTask(); } ); }, onResizestart :function(onResizestart){ var isExecuted = false; this.onResizend(function(){isExecuted = false;}); this.addEvent( window, 'resize', function(){ if(!isExecuted){ onResizestart && onResizestart(); isExecuted = true; } } ); } }; // For IE8 and earlier version. if (!Date.now) { Date.now = function() { return new Date().valueOf(); } } if(!Array.prototype.indexOf){ Array.prototype.indexOf = function(obj, start) { for (var i = (start || 0), j = this.length; i < j; i++) { if (this[i] === obj) { return i; } } return -1; } } var UID = Date.now(); String.prototype.test=function(n){ return this.match(n)==null?false:true; } String.prototype.uniqueID= function(){ return (UID++).toString(36); }; Array.prototype.includex=function(n){ if(this.indexOf(n)==-1)this.push(n); } Object.toInt=function(){return parseInt(this);} /*Object.append=function (z){for(var y=1,w=arguments.length; y').append($('
    ').html(titleAttr)).append($('
    ').html($(elm).attr('rel'))); var tips=$('
    ').css({'position':'absolute'}) .append($('
    ')) .append(content).append($('
    ')).appendTo($('body')) ; $(elm).data('tips',tips); $(elm).attr('oldtitle',$(elm).attr('title')); $(elm).removeAttr('title'); } $(elm).data('tips').css({'left':$(window).scrollLeft()+e.clientX+options.offsets.x,'top':$(window).scrollTop()+e.clientY+options.offsets.y}).fadeIn('slow'); }).bind('mouseleave',function(){ if($(elm).data('tips'))$(elm).data('tips').fadeOut(); }).bind('mousemove',function(e){ if($(elm).data('tips'))$(elm).data('tips').css({'left':$(window).scrollLeft()+e.clientX+options.offsets.x,'top':$(window).scrollTop()+e.clientY+options.offsets.y}); }).bind('click',function(e){ $(elm).data('tips').remove(); $(elm).removeData('tips'); }); } function Swiff(path,options){ this.options={ id: null, height: 1, width: 1, container: null, properties: {}, params: { quality: 'high', allowScriptAccess: 'always', wMode: 'window', swLiveConnect: true }, callBacks: {}, vars: {} }; this.instance = 'Swiff_' + String.prototype.uniqueID(); this.options=$.extend(this.options,options); options = this.options; var id = this.id = options.id || this.instance; var container = this.options.container; Swiff.CallBacks[this.instance] = {}; var params = options.params, vars = options.vars, callBacks = options.callBacks; var properties = $.extend(options.properties,{height: options.height, width: options.width}); var self = this; for (var callBack in callBacks){ Swiff.CallBacks[this.instance][callBack] = (function(option){ return function(){ return option.apply(self.object, arguments); }; })(callBacks[callBack]); vars[callBack] = 'Swiff.CallBacks.' + this.instance + '.' + callBack; } params.flashVars = Object.toQueryString(vars); if (jQuery.browser.msie){ properties.classid = 'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'; params.movie = path; } else { properties.type = 'application/x-shockwave-flash'; } properties.data = path; var build = ''; } build += ''; this.object = ((container.length<=0) ? container.empty() : jQuery('
    ').html( build).appendTo(container)); } Swiff.prototype.toElement=function(){ return this.object; }, Swiff.prototype.replaces= function(element){ element = document.getElementById(element); element.parentNode.replaceChild(this.toElement(), element); return this; }, Swiff.prototype.inject= function(element){ document.getElementById(element).appendChild(this.toElement()); return this; }, Swiff.prototype.remote= function(){ return Swiff.remote.apply(Swiff, [this.toElement()].append(arguments)); } Swiff.CallBacks = {}; Swiff.remote = function(obj, fn){ var rs = obj.CallFunction('' + __flash__argumentsToXML(arguments, 2) + ''); return eval(rs); }; function Chain(){ this.$chain= []; } Chain.prototype.chain=function(){ this.$chain.append(Array.flatten(arguments)); return this; }; Chain.prototype.callChain=function(){ return (this.$chain.length) ? this.$chain.shift().apply(this, arguments) : false; }; Chain.prototype.clearChain=function(){ this.$chain.empty(); return this; }; //start multiBox class window.multiBox = function(options){ //options this.options={ initialSize: {w:250, h:250},//initial width/height the box will open at before resizing useOverlay: false,//do you want to use a semi-transparent background? contentColor: '#fff',//background colour of the content holder within the pop-up showNumbers: true,//show numbers such as "4 of 12" showControls: true,//show the previous/next, title, download etc descClassName: false,//class of description box movieSize: {w:400, h:300},//default width/height of movie offset: {x:0, y:0},//offset multiBox position fixedTop: false,//force multiBox to open at top of page path: './Files/',//path to mp3player and flvplayer etc openFromLink: true,//pop-up will slide in from the position of the element clicked useKeyboard: true//allow keyboard shortcuts (esc: close, spacebar & right arrow: next, left arrow: previous) }; this.openClosePos = {}; this.contentToLoad = {}; this.contentObj = {}; this.containerDefaults = {}; this.multiBox = []; this.families = []; this.content = []; this.timer = 0; this.index = 0; this.opened = false; this.currentGallery = null; //initialization //set options this.options=$.extend(this.options,options); //set variables //start multiBox if($(this.options.mbClass).length > 0){this.start();}; } //start multiBox multiBox.prototype.start= function(){ //there will be no next/previous buttons unless you specify them to a group $(this.options.mbClass).each($.proxy(function(index,el){ //we must store original rel & title values to use later if($chk($(el).attr('rel'))){ $(el).data('origRel',$(el).attr('rel')); }; if($chk($(el).attr('title'))){ $(el).data('origTitle',$(el).attr('title')); }; //check if it has a rel="[group]" if($(el).attr('rel').toString().test(/\[*?]/i)){ //if there are more than 1 rel value, we need to split them to find our group if($(el).attr('rel').indexOf(',')>-1){ //split then loop through each array instance of the split rel's var tempArr = $(el).attr('rel').split(','); tempArr.forEach($.proxy(function(temp,i){ if(temp.contains('[')){//only take out the rel relating to a [group] //change this links relation to the temp variable $(el).attr('rel',temp); }; },this)); }; //if rel isnt already in fanilies then create a new instance for it this.families.includex($(el).attr('rel')); }; //finally now we have put them into families, push each link with 'mbClass' into multiBox array this.multiBox.push(el); },this)); //loop through each mb link seperating content into groups of families this.multiBox.forEach((function(el){ //check rel contains a group if($(el).attr('rel').toString().test(/\[*?]/i)){ //we know the link has a group so loop through each family to find where it belongs this.families.forEach((function(fam,i){ //if the rel belongs to a family we make sure its pushed into correct family array within content array if($(el).attr('rel') == fam){ //if there isnt a family array within content array to hold this family create one if(!this.content[i]){ //create new gallery this.content[i] = []; }; //finally push link into appropriate family within content array this.content[i].push(el); }; }).bind(this)); } }).bind(this)); //loop through each mb link seperating content into groups of families this.multiBox.forEach((function(el){ //check rel DOESNT contain a group if($(el).attr('rel').toString().test(/\[*?]/i) == false){ //add link into content array as a single array as it doesnt belong to a family this.content.push([el]); }; }).bind(this)); this.container = $('
    ').appendTo(this.options.container); this.iframe = $('').css( { 'position': 'absolute', 'top': 0, 'left': 0, 'width': '100%', 'height': '100%', 'filter': 'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)', 'opacity': 0 }).appendTo(this.container); this.box = $('
    ').addClass('MultiBoxContent').appendTo(this.container); this.closeButton = $('
    ').addClass('MultiBoxClose').appendTo(this.container).bind('click', this.close.bind(this)); this.controlsContainer = $('
    ').addClass('MultiBoxControlsContainer').appendTo(this.container); this.controls = $('
    ').addClass('MultiBoxControls').appendTo(this.controlsContainer); this.previousButton = $('
    ').addClass('MultiBoxPrevious').appendTo(this.controls).bind('click', this.previous.bind(this)); this.nextButton = $('
    ').addClass('MultiBoxNext').appendTo(this.controls).bind('click', this.next.bind(this)); this.title = $('
    ').addClass('MultiBoxTitle').appendTo(this.controls); this.number = $('
    ').addClass('MultiBoxNumber').appendTo(this.controls); this.description = $('
    ').addClass('MultiBoxDescription').appendTo(this.controls); //check user options and call functions accordingly if(this.options.useKeyboard){ $(window.document).bind('keydown',(function(e){ if(e.key == 'right' || e.key == 'space'){ this.next(); }else if(e.key == 'left'){ this.previous(); }else if(e.key == 'esc'){ this.close(); }; }).bind(this)); }; if(this.options.useOverlay){ this.overlay = new Overlay({ container:this.options.container, onClick:this.close.bind(this) }); //console.log(this.overlay); //this.overlay.style.width='%100'; //this.overlay.style.height='%100'; }; if(this.options.addOverlayIcon == true){ this.addOverlayIcon(this.multiBox); }; if(this.options.addRollover == true){ this.addRollover(this.multiBox); }; if(this.options.addChain == true){ this.addChain(this.multiBox); }; if(this.options.descClassName){ this.descriptions = $('.'+this.options.descClassName); }; if(this.options.addDownload == true){ this.addDownload(this.multiBox); }; if(this.options.addTips == true){ this.addTips(this.multiBox); }; //if there is only one multiBox link don't show unneccesary buttons if(this.multiBox.length == 1){ this.title.css('marginLeft',0); this.description.css('marginLeft',0); this.previousButton.css('display','none'); this.nextButton.css('display','none'); this.number.css('display','none'); }; $('
    ').css('clear','both').appendTo(this.controls); //start breaking into content array to add event listeners to each link within each group this.content.forEach((function(el,i){ //now we are left with each group as arrays $(el).each((function(i,group){ //add event listener $(group).bind('click', (function(e){ var myTarget = ($(e.target).attr('href')) ? $(e.target) : $(e.target).parent('a'); // console.log(myTarget); e.preventDefault(); this.open($(el).index(myTarget),el); }).bind(this)); //check to see if link is an HTML element if(group.href.indexOf('#') > -1){ //grab it as an object group.content = $(group.href.substr(group.href.indexOf('#')+1)); //hide the object if(group.content){ group.content.css('display','none'); }; }; }).bind(this)); }).bind(this)); //this.containerEffects = new Fx.Morph(this.container,{duration:400}); //this.controlEffects = new Fx.Morph(this.controlsContainer,{duration:300}); this.reset(); //auto open a multiBox element if(this.options.autoOpen > 0){ this.autoOpen(this.multiBox); }; }; multiBox.prototype.setContentType= function(element){ var str = element.href.substr(element.href.lastIndexOf('.')+1).toLowerCase(); var myRel = $(element).data('origRel'); var contentOptions = {}; //retrieve original rel values and make sure there was one if($chk(myRel)){ //split the options just incase there are more than 1 var optArr = myRel.split(','); optArr.forEach(function(el,i){ //make sure the group is ignored if(el.test(/\[*?]/i) != true){ var ta = el.split(':'); contentOptions[ta[0]] = ta[1]; }; }); }; if(contentOptions.type != undefined){ str = contentOptions.type; }; this.contentObj.url = element.href; this.contentObj.xH = 0; if(contentOptions.width){ this.contentObj.width = contentOptions.width; }else{ this.contentObj.width = this.options.movieSize.w; }; if(contentOptions.height){ this.contentObj.height = contentOptions.height; }else{ this.contentObj.height = this.options.movieSize.h; }; if(contentOptions.panel){ this.panelPosition = contentOptions.panel; }else{ this.panelPosition = this.options.panel; }; switch(str){ case 'jpg': case 'gif': case 'png': this.type = 'image'; break; case 'swf': this.type = 'flash'; break; case 'flv': this.type = 'flashVideo'; this.contentObj.xH = 70; break; case 'mov': this.type = 'quicktime'; break; case 'wmv': this.type = 'windowsMedia'; break; case 'rv': case 'rm': case 'rmvb': this.type = 'real'; break; case 'mp3': this.type = 'flashMp3'; this.contentObj.width = 320; this.contentObj.height = 70; break; case 'element': this.type = 'htmlelement'; this.elementContent = $(element.content); this.elementContent.css({ 'display': 'block', 'opacity': 0, 'width': 'auto'//added this to get htmlElement to behave }); //check and see if styles are being applied to HTML content section if(this.elementContent.css('width') != 'auto'){ this.contentObj.width = this.elementContent.getWidth(); }; this.contentObj.height = this.elementContent.getHeight(); this.elementContent.css({ 'display': 'none', 'opacity': 1 }); break; default: this.type = 'iframe'; if(contentOptions.req){ this.type = 'req'; }; break; } }; multiBox.prototype.reset= function(){ this.container.css({ 'opacity': 0, 'display': 'none' }); this.controlsContainer.css('height',0); this.removeContent(); this.previousButton.removeClass('MultiBoxButtonDisabled'); this.nextButton.removeClass('MultiBoxButtonDisabled'); this.opened = false; }, multiBox.prototype.getOpenClosePos= function(element){ var border=this.container.css('border')?this.container.css('border'):0; element=$(element); if(this.options.openFromLink){ if(element.getFirst().length>0){ var w = element.getFirst().width() - (parseInt(border) * 2); if(w < 0){ w = 0; }; var h = element.getFirst().height() - (parseInt(border) * 2); if(h < 0){ h = 0; }; if(element.find('img').length>0) var l=element.children(0).offset().left; else var l=element.offset().left; this.openClosePos = { width: w, height: h, top: element.offset().top, left: l }; }else{ var w = element.width() - (parseInt(border) * 2); if(w < 0){ w = 0; }; var h = element.height() - (parseInt(border) * 2); if(h < 0){ h = 0; }; if(element.find('img').length>0) var l=element.children(0).offset().left; else var l=element.offset().left; this.openClosePos = { width: w, height: h, top: element.offset().top, left: l }; }; }else{ if(this.options.fixedTop){ var top = this.options.fixedTop; }else{ var top = $(window).scrollTop()+ (($(window).height()/2)-(this.options.initialSize.h/2)-parseInt(border))+this.options.offset.y; }; this.openClosePos = { width: this.options.initialSize.w, height: this.options.initialSize.h, top: top, left: (($(window).width()/2)-(this.options.initialSize.w/2)-parseInt(border))+this.options.offset.x }; }; return this.openClosePos; }, multiBox.prototype.open= function(index,currGal){ this.overlay.container.css({'zIndex':100,'visible':'visible'}); //need to store current gallery and index of the object in gallery this.currentGallery = currGal; this.index = index; //grab id so description can be matched this.openId = $(this.currentGallery[this.index]).attr('id'); //check to see if mb is already open if(!this.opened){ this.opened = true; //console.log(this.overlay); if(this.options.useOverlay){ this.overlay.show(); }; this.container.css(this.getOpenClosePos(this.currentGallery[this.index])); this.container.css({ 'opacity': 0, 'display': 'block' }); if(this.options.fixedTop){ var top = parseInt(this.options.fixedTop); }else{ var top = parseInt($(window).scrollTop())+parseInt(($(window).height()/2)-parseInt(this.options.initialSize.h/2)-parseInt(this.container.css('border')?this.container.css('border'):0))+parseInt(this.options.offset.y); }; var left=(($(window).width()/2)-(this.options.initialSize.w/2)-parseInt(this.container.css('border')?this.container.css('border'):0))+this.options.offset.x; //console.log($(window).width()/2,this.options.initialSize.w/2,parseInt(this.container.css('border')),this.options.offset.x); this.container.animate({ 'width': this.options.initialSize.w, 'height': this.options.initialSize.h, 'top': top, 'left': left, 'opacity': 1 },{duration:400,easing:'easeOutExpo',complete:(function(){}).bind(this)}); this.load(this.currentGallery[this.index]); }else{ if(this.options.showControls){ this.hideControls(); }; this.getOpenClosePos(this.currentGallery[this.index]); this.timer = setTimeout(this.hideContent.bind(this),500); this.timer = setTimeout(function(){this.load.passx(this.currentGallery[this.index],this);},1100); } if(window.myGallery){ window.myGallery.clearTimer(); jQuery('#myGallery').unbind('mouseout'); } }, multiBox.prototype.getContent= function(element){ this.setContentType(element); var desc = {}; if(this.options.descClassName){ this.descriptions.each((function(i,el){ if($(el).hasClass(this.openId)){ desc = $(el).clone(); }; }).bind(this)); }; this.contentToLoad = { title: $(element).data('origTitle') || ' ', desc: desc, number: this.index+1 }; }, multiBox.prototype.close= function(){ if(this.options.useOverlay){ this.overlay.hide(); }; if(this.options.showControls){ this.hideControls(); }; this.hideContent(); this.container.stop(); setTimeout(this.zoomOut.bind(this),500); if(window.myGallery){ window.myGallery.prepareTimer(); jQuery('#myGallery').bind('mouseout',function(){window.myGallery.prepareTimer();}); } }, multiBox.prototype.zoomOut= function(){ this.container.animate({ 'width': this.openClosePos.width, 'height': this.openClosePos.height, 'top': this.openClosePos.top, 'left': this.openClosePos.left, 'opacity': 0 }); setTimeout(this.reset.bind(this),500); }, multiBox.prototype.load= function(element){ //console.log(this.box[0]); this.box.addClass('MultiBoxLoading'); this.getContent(element); //this.type='image'; //console.log(this.type); if(this.type == 'image'){ var xH = this.contentObj.xH; if($.browser.msie) this.contentObj = $('').attr('src',element.href).load(setTimeout(this.resize.bind(this),100)); else this.contentObj = $('').attr('src',element.href).load(/*setTimeout(*/this.resize.bind(this)/*,100)*/); //new Asset.image(element.href,{onload:this.resize.bind(this)}); this.contentObj.xH = xH; }else{ this.resize(); }; if (document.getElementById("OverlayContainer")) { document.getElementById("OverlayContainer").style.height = document.body.offsetHeight + "px"; document.getElementById("OverlayContainer").style.width = document.body.offsetWidth + "px"; } }, multiBox.prototype.resize= function(){ var s5_mult_tooltips = document.getElementById("s5_body").getElementsByTagName("DIV"); for (var s5_mult_tooltips_y=0; s5_mult_tooltips_y $(window).width()){ dW = that.contentObj.width=$(window).width()-60-30; dH=parseInt((h * dW) / w); if(dH>h) dH=h; } that.contentObj.height = dH;//resize image height that.contentObj.width = dW;//resize image width that.resize2(); //console.log(that.contentObj.width, that.contentObj.height); } ii.src = that.contentObj.attr('src'); ii = null; }else{ this.contentObj.height = dH; this.contentObj.width = dW; this.resize2(); } } } } multiBox.prototype.resize2 = function(){ //console.log(this.contentObj.height,this.contentObj.width); if(this.options.fixedTop){ var top = this.options.fixedTop; }else{ var top = (($(window).height() / 2) - ((Number(this.contentObj.height) + this.contentObj.xH) / 2) - parseInt(this.container.css('borderBottomWidth')) + $(window).scrollTop()) + this.options.offset.y; }; var left = (($(window).width() / 2) - (this.contentObj.width / 2) - parseInt(this.container.css('borderBottomWidth'))) + this.options.offset.x; if(top < 0){ top = 0; }; if(left < 0){ left = 0; }; //console.log(top,left); this.container.stop(); this.container.animate({ 'width': Number(this.contentObj.width), 'height':Number(this.contentObj.height), 'top': top,'left': left, 'opacity': 1 },400,'linear',(function(){this.container.css('overflow','visible');}).bind(this)); this.timer = setTimeout(this.showContent.bind(this),0); } multiBox.prototype.showContent= function(){//alert('show'); this.box.removeClass('MultiBoxLoading'); this.removeContent(); this.contentContainer = $('
    ').css({ 'opacity': 0, 'width': this.contentObj.width, 'height': (Number(this.contentObj.height)+this.contentObj.xH) }).appendTo(this.box); if(this.type == 'image'){ //console.log(this.contentObj,this.contentContainer); this.contentObj.clone().appendTo(this.contentContainer); }else if(this.type == 'iframe'){ $('').width(this.contentObj.width).height(this.contentObj.height).attr('src',this.contentObj.url).appendTo(this.contentContainer); }else if(this.type == 'htmlelement'){ this.elementContent.clone().css('display','block').appendTo(this.contentContainer); }/*else if(this.type == 'req'){ var req = new Request.HTML({ url: this.contentObj.url, method: 'get', evalScripts: true, onSuccess= function(responseTree,responseElements,responseHTML,responseJavaScript){ $('MultiBoxContentContainer').adopt(responseElements); }, onFailure= function() { $('MultiBoxContentContainer').attr('text','The request failed.'); } }).send(); }*/else{ this.obj = $('
    ').appendTo(this.contentContainer); this.createEmbedObject(); //if its a movie appendTo the object string into obj if(this.str){ // this.obj.attr('html',this.str); this.obj.html(this.str); this.str = null;//clear the value after using it }; }; this.contentContainer.animate({opacity:1},500,'easeOutExpo'); this.title.html(this.contentToLoad.title); if (this.currentGallery) { this.number.html(this.contentToLoad.number+' of '+this.currentGallery.length); if(this.options.descClassName){ //check to see if there is a desc override if($(this.currentGallery[this.index]).data('origRel')){ //declare variables var ignoreDesc = false; var myRel = $(this.currentGallery[this.index]).data('origRel'); var optArr = myRel.split(','); //loop through each split looking for 'noDesc' optArr.forEach(function(el){ if(el.test('noDesc') == true){ ignoreDesc = true; }; }); }; //check and see if user wants to override default description setting for this element if(ignoreDesc != true){ if(this.description.getFirst()){ //this.description.getFirst().destroy(); this.description.getFirst().remove(); }; if (this.contentToLoad.desc.appendTo) { this.contentToLoad.desc.appendTo(this.description).css('display','block'); } }; } } ; if(this.options.showControls){ this.timer = setTimeout($.proxy(this.showControls,this),600); }; if(this.options.addDownload){ var filePath = this.currentGallery[this.index].href; var fileName = this.currentGallery[this.index].href.substring(this.currentGallery[this.index].href.lastIndexOf('/')+1); this.download.html('Download File'); //empty download if its not an image if(this.type != 'image'){ this.download.empty(); }; }; }, multiBox.prototype.hideContent= function(){ this.box.addClass('MultiBoxLoading'); this.contentContainer.animate({ opacity: 0 },500,'easeOutExpo'); setTimeout($.proxy(this.removeContent,this),500); }, multiBox.prototype.removeContent= function(){ if($('#MultiBoxMediaObject')){ $('#MultiBoxMediaObject').empty();//so sound doesnt keep playing in IE $('#MultiBoxMediaObject').remove();//dispose() instead of destroy() as IE 6&7 crashes }; if($('#MultiBoxContentContainer')){ $('#MultiBoxContentContainer').remove();//dispose() instead of destroy() as IE 6&7 crashes }; //if(this.type=='image') this.contentObj.removeAttr('src'); if(this.description){ this.description.empty();//empty description incase next element doesnt want to have one }; }, multiBox.prototype.showControls= function(){ if(this.container.css('height') != 'auto'){ this.containerDefaults.height = this.container.css('height'); this.containerDefaults.backgroundColor = this.options.contentColor; //controls box isnt taken into consideration when positioning the container from the top so correct this if(this.options.recalcTop == true){ if(parseInt(this.container.css('top')) > parseInt(this.controls.css('height'))/2){ this.container.animate({'top':parseInt(this.container.css('top'))-parseInt(this.controls.css('height'))/2},400,'easeOutExpo'/*,(function(){this.container.css('overflow','visible');}).bind(this)*/); }; }; }; this.container.css('height','auto'); if(this.contentToLoad.number == 1){ this.previousButton.addClass('MultiBoxPreviousDisabled'); }else{ this.previousButton.removeClass('MultiBoxPreviousDisabled'); }; if (this.currentGallery) { if(this.contentToLoad.number == this.currentGallery.length){ this.nextButton.addClass('MultiBoxNextDisabled'); }else{ this.nextButton.removeClass('MultiBoxNextDisabled'); } } ; this.controlsContainer.animate({ 'height': this.controls.css('height') },300,'easeOutExpo'); //this.resize.bind(this).delay(500); }; multiBox.prototype.hideControls= function(num){ this.controlsContainer.animate({'height': 0},300,(function(){ this.container.css(this.containerDefaults); }).bind(this)); }; multiBox.prototype.next= function(){ if(this.index < this.currentGallery.length-1){ this.index++; this.openId = $(this.currentGallery[this.index]).attr('id'); if(this.options.showControls){ this.hideControls(); }; this.getOpenClosePos(this.currentGallery[this.index]); this.timer = setTimeout(this.hideContent.bind(this),500); this.timer = setTimeout(this.load.passx(this.currentGallery[this.index],this),1100); }; }, multiBox.prototype.previous= function(){ if(this.index > 0){ this.index--; this.openId = $(this.currentGallery[this.index]).attr('id'); if(this.options.showControls){ this.hideControls(); }; this.getOpenClosePos(this.currentGallery[this.index]); this.timer = setTimeout(this.hideContent.bind(this),500); this.timer = setTimeout(this.load.passx(this.currentGallery[this.index],this),1000); }; }, multiBox.prototype.createEmbedObject= function(){ if(this.type == 'flash'){ var url = this.contentObj.url; var swfHolder = $('
    ').attr({id: 'swfHolder'}).appendTo(this.obj); var flashObj = new Swiff(url, { id: url, container: swfHolder, width: this.contentObj.width, height: this.contentObj.height }); }else if(this.type == 'flashVideo'){ var url = this.contentObj.url; var swfHolder = $('
    ').attr({id: 'swfHolder'}).appendTo(this.obj); var flashObj = new Swiff(this.options.path+'flvplayer.swf', { id: url, container: swfHolder, width: this.contentObj.width, height: (Number(this.contentObj.height)+this.contentObj.xH), vars: { path: url } }); }else if(this.type == 'flashMp3'){ var url = this.contentObj.url; var swfHolder = $('
    ').appendTo(this.obj); var flashObj = new Swiff(this.options.path+'mp3player.swf', { id: url, container: swfHolder, width: this.contentObj.width, height: (Number(this.contentObj.height)+this.contentObj.xH), vars: { path: url } }); }else if(this.type == 'quicktime'){ var url = this.contentObj.url; this.str = ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; }else if(this.type == 'windowsMedia'){ var url = this.contentObj.url; this.str = ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; }else if(this.type == 'real'){ var url = this.contentObj.url; this.str = ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; this.str += ''; }; }; multiBox.prototype.addOverlayIcon=function(element){ //loop through each instance $(element).each(function(i,el){ //if link contains an image ad overlay if($(el).getElement('img')){ //add position:relative to them so that icon is contained $(el).css('position','relative'); //appendTo a new div that is the overlay icon var overlayIcon = $('
    ').appendTo(el); overlayIcon.addClass('OverlayIcon'); //IE6 causes too many issues due to lack of PNG support if(!Browser.Engine.trident4 && 0){ overlayIcon.css('opacity',0); overlayIcon.attr('tween',{duration:3000,transition:Fx.Transitions.Expo.easeIn}).tween('opacity',1); }; }; }); }, multiBox.prototype.addRollover=function(element){ $(element).each(function(i,el){ //if link contains an image ad overlay var tmp=$('img',el).eq(0); if(tmp.length>0){ //add event listeners $(el).bind( 'mouseenter', function(){ tmp.data('tween',{'duration':200,'easing':'linear'}).animate({'opacity':0.5,'duration':0,'easing':'linear','queue':false}); //tmp.animate({'width':0},0,'linear'); }); $(el).bind( 'mouseleave', function(){ tmp.data('tween',{'duration':400,'easing':'linear'}).animate({'opacity':1,'duration':0,'easing':'linear','queue':false}); //tmp.animate({'width':0},0,'linear'); }); }; }); //console.log(2); }, multiBox.prototype.addChain=function(element){ //create new array to hold all links with images to chain through var chainArray = []; //push link into chainArray if it contains an image $(element).each(function(i,el){ //detect whether link contains image if($(el).getElement('img')){ chainArray.push(el); }; }); //now chain through each item in the new array chainArray.forEach(function(el,i){ //detect whether link contains image if($(el).getElement('img')){ //chain through each multibox link that contains an image var HoverMe = new Chain(); var hoverOn = function(){ $(el).getElement('img').data('tween',{duration:200,'easing':'linear'}).animate({'opacity':0.5},0); }; var hoverOff = function(){ $(el).getElement('img').data('tween',{duration:400,'easing':'linear'}).animate({'opacity':1},0); }; HoverMe.chain(hoverOn); HoverMe.chain(hoverOff); HoverMe.callChain.delay(2000+(i+1)*1000,HoverMe); HoverMe.callChain.delay((i+2)*1000,HoverMe); }; }); }, multiBox.prototype.addDownload=function(element){ this.download = $('
    ').addClass('MultiBoxDownload').appendTo(this.controls).css('marginLeft',0); }, multiBox.prototype.addTips=function(element){ $(element).each(function(i,el){ //add MooTools tips if($(el).attr('title')){ var toolTips = new Tips($(el), { offsets: {'x':16,'y':5}, className: 'mbTips' }); }; //remove title so dont get duplication of title and MooTools tips if($(el).getElement('img')){ if($(el).getElement('img').attr('title')){ $(el).getElement('img').removeAttr('title'); }; if($(el).getElement('img').attr('alt')){ $(el).getElement('img').removeAttr('alt'); }; }; }); }, multiBox.prototype.autoOpen=function(element){ //make sure element number is valid if(this.options.autoOpen > $(this.options.mbClass).length){ this.options.autoOpen = $(this.options.mbClass).length; }; //auto open multiBox on page this.open(this.options.autoOpen-1,element); } })(jQuery); // source --> https://kamith.org/wp-content/themes/s5_prestige_academy/js/core/s5_font_adjuster-min.js /* FontSizer v2.2 Javascript to dynamically change font sizes on a web page. Coded by Phil Nash of www.unintentionallyblank.co.uk Cookies script courtesy of http://www.quirksmode.org/js/cookies.html Measuring the current font size courtesy of http://www.alistapart.com/articles/fontresizing ** Please don't remove this notice ** See http://www.unintentionallyblank.co.uk/2007/11/09/fontsizer-reloaded-changing-font-sizes-with-javascript/ for full details */ addDOMLoadEvent=function(){var e,t,n,o,r,a=[],i=document,s=window,c="readyState",d="onreadystatechange",f=function(){for(n=1,clearInterval(e);o=a.shift();)o();t&&(t[d]="")};return function(t){return n?t():(a[0]||(i.addEventListener&&i.addEventListener("DOMContentLoaded",f,!1),/WebKit/i.test(navigator.userAgent)&&(e=setInterval(function(){/loaded|complete/.test(i[c])&&f()},10)),r=s.onload,s.onload=function(){f(),r&&r()}),void a.push(t))}}();var s5_font_adjuster_src="",s5_font_adjuster_scriptSource=function(e){var e=document.getElementsByTagName("script"),t=e[e.length-1];s5_font_adjuster_src=t.getAttribute("src",-1)}(),s5_font_adjuster_cookie_name=s5_font_adjuster_src;if(s5_font_adjuster_src.indexOf("templates")>0){var s5_font_adjuster_src_array=s5_font_adjuster_src.split("templates");s5_font_adjuster_cookie_name=s5_font_adjuster_src_array[0]}else if(s5_font_adjuster_src.indexOf("wp-content")>0){var s5_font_adjuster_src_array=s5_font_adjuster_src.split("wp-content");s5_font_adjuster_cookie_name=s5_font_adjuster_src_array[0]}var fS={iFS:null,cFS:null,init:function(e){if(document.getElementById&&document.createTextNode){if(UBCookie.read(s5_font_adjuster_cookie_name)){var t=UBCookie.read(s5_font_adjuster_cookie_name).split(",");fS.iFS=1*t[0],fS.cFS=1*t[1],fS.setBodySize()}else{var n=document.createElement("span");n.innerHTML=" ",n.style.position="absolute",n.style.left="-9999px",n.style.lineHeight="1em",document.body.insertBefore(n,document.body.firstChild),fS.iFS=n.offsetHeight/16,fS.cFS=fS.iFS,UBCookie.create(s5_font_adjuster_cookie_name,fS.iFS+","+fS.cFS,30)}fS.addJSLink(e,fS.decFS,"A","decreaseSize"),fS.addJSLink(e,fS.rFS,"A","resetSize"),fS.addJSLink(e,fS.incFS,"A","increaseSize")}},incFS:function(){return fS.cFS=1.1*fS.cFS,fS.setBodySize(),!1},decFS:function(){return fS.cFS=.9*fS.cFS,fS.setBodySize(),!1},rFS:function(){return fS.cFS=fS.iFS,fS.setBodySize(),!1},setBodySize:function(){document.body.style.fontSize=fS.cFS+"em",UBCookie.create(s5_font_adjuster_cookie_name,fS.iFS+","+fS.cFS,30)},addJSLink:function(e,t,n,o){var r=document.getElementById(e),a=document.createElement("a");a.className=o;var n=document.createTextNode(n);a.appendChild(n),a.onclick=t,a.href="javascript:;"+e,r.appendChild(a)}},UBCookie={create:function(e,t,n){if(n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3);var r="; expires="+o.toGMTString()}else var r="";document.cookie=e+"="+t+r+"; path=/"},read:function(e){for(var t=e+"=",n=document.cookie.split(";"),o=0;o