$(document).ready(function(){ jQuery('#mn_dtaqua').mmenu({}); $(window).bind('scroll', function (){ var h_top=$('.header_menu_wrapper').offset(); if($(window).scrollTop() > h_top.top){ $('.scroll_header_menu_wrapper').addClass('show_scroll_menu'); }else{ $('.scroll_header_menu_wrapper').removeClass('show_scroll_menu'); }}); new WOW().init(); }); window.onload=function(){ $('.slogan_wrapper').removeClass('hide_slogan'); }; $(document).ready(function(){ $('.about_slider_wrapper').slick({ arrows: false, dots: false, slidesToShow: 1, slidesToScroll: 1, fade: true, speed: 1000, cssEase: 'cubic-bezier(0.7, 0, 0.3, 1)', autoplay: true, autoplaySpeed: 4000, }); }); $(document).on('scroll', function(){ var ft_about=$('.lp_dtaqua_about'); if($(this).scrollTop()>=ft_about.offset().top - ft_about.outerHeight() + 250){ $('.about_content_wrapper').addClass('show_about'); }}); $(document).ready(function(){ $('.hp_news_slider').slick({ arrows: false, dots: false, vertical: true, verticalSwiping: true, slidesToShow: 3, responsive: [ { breakpoint: 992, settings: { slidesToShow: 2, vertical: false, verticalSwiping: false, }}, { breakpoint: 620, settings: { slidesToShow: 1, vertical: false, verticalSwiping: false, }} ] }); }); $(document).ready(function(){ }); $(document).ready(function(){ $('.promo_product_slider').slick({ arrows: true, dots: false, slidesToShow: 4, responsive: [ { breakpoint: 992, settings: { slidesToShow: 3, arrows: false, }}, { breakpoint: 481, settings: { slidesToShow: 2, arrows: false, }} ] }); }); $(document).ready(function(){ }); $(document).ready(function(){ (function($){ $(window).on("load",function(){ $(document).scrollzipInit(); $(document).rollerInit(); }); $(window).on("load scroll resize", function(){ $('.numscroller').scrollzip({ showFunction:function(){ numberRoller($(this).attr('data-slno')); }, wholeVisible:false, }); }); $.fn.scrollzipInit=function(){ $('body').prepend("
"); }; $.fn.rollerInit=function(){ var i=0; $('.numscroller').each(function(){ i++; $(this).attr('data-slno',i); $(this).addClass("roller-title-number-"+i); }); }; $.fn.scrollzip=function(options){ var settings=$.extend({ showFunction:null, hideFunction:null, showShift:0, wholeVisible:false, hideShift:0, }, options); return this.each(function(i,obj){ $(this).addClass('scrollzip'); if($.isFunction(settings.showFunction)){ if(!$(this).hasClass('isShown')&& ($(window).outerHeight()+$('#scrollzipPoint').offset().top-settings.showShift)>($(this).offset().top+((settings.wholeVisible)?$(this).outerHeight():0))&& ($('#scrollzipPoint').offset().top+((settings.wholeVisible)?$(this).outerHeight():0))<($(this).outerHeight()+$(this).offset().top-settings.showShift) ){ $(this).addClass('isShown'); settings.showFunction.call(this); }} if($.isFunction(settings.hideFunction)){ if($(this).hasClass('isShown')&& (($(window).outerHeight()+$('#scrollzipPoint').offset().top-settings.hideShift)<($(this).offset().top+((settings.wholeVisible)?$(this).outerHeight():0))|| ($('#scrollzipPoint').offset().top+((settings.wholeVisible)?$(this).outerHeight():0))>($(this).outerHeight()+$(this).offset().top-settings.hideShift)) ){ $(this).removeClass('isShown'); settings.hideFunction.call(this); }} return this; }); }; function numberRoller(slno){ var min=$('.roller-title-number-'+slno).attr('data-min'); var max=$('.roller-title-number-'+slno).attr('data-max'); var timediff=$('.roller-title-number-'+slno).attr('data-delay'); var increment=$('.roller-title-number-'+slno).attr('data-increment'); var numdiff=max-min; var timeout=(timediff*1000)/numdiff; numberRoll(slno,min,max,increment,timeout); } function numberRoll(slno,min,max,increment,timeout){ if(min<=max){ $('.roller-title-number-'+slno).html(min); min=parseInt(min)+parseInt(increment); setTimeout(function(){numberRoll(eval(slno),eval(min),eval(max),eval(increment),eval(timeout))},timeout); }else{ $('.roller-title-number-'+slno).html(max); }} })(jQuery); }); $(document).ready(function(){ }); $(document).ready(function(){ $('.lp_pcccnguyenduc_contact_btn .contact_btn_grp .toggle_contact_btn').on('click', function(){ $(this).prev('ul').toggleClass('active'); }); $('.lp_pcccnguyenduc_contact_btn .contact_btn_grp>ul>li').on('click', function(){ $(this).find('ul').toggleClass('active_phone'); }); $('.lp_nguyentam_drag_btn .toggle_button').on('click', function(){ $(this).toggleClass('active'); $('.lp_nguyentam_drag_btn ul').toggleClass('active'); }); $('.totopbtn').on('click', function(e){ e.preventDefault(); $('html, body').animate({scrollTop:0}, '1000'); }); $('.draggable_button').draggable(); $('.lp_component_tienich_respon_btn > ul > li > a').on('click', function(){ $(this).next('ul').toggleClass('active'); }); $('.lp_respon_btn_type5 .type5_active_button').on('click', function(){ $(this).toggleClass('rotate_arrow').prevAll('.social_items').toggleClass('hide_type5'); }); $('.lp_respon_btn_type5 ul li ul').each(function(){ $(this).children('li').each(function(i, e){ $(this).css('transition-delay', i*.1+'s'); }); }); }); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/version.js',[ "jquery" ], factory); }else{ factory(jQuery); }}(function($){ $.ui=$.ui||{}; return $.ui.version="@VERSION"; })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/data',[ "jquery", "./version" ], factory); }else{ factory(jQuery); }}(function($){ return $.extend($.expr[ ":" ], { data: $.expr.createPseudo ? $.expr.createPseudo(function(dataName){ return function(elem){ return !!$.data(elem, dataName); };}) : function(elem, i, match){ return !!$.data(elem, match[ 3 ]); }}); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/disable-selection',[ "jquery", "./version" ], factory); }else{ factory(jQuery); }}(function($){ return $.fn.extend({ disableSelection:(function(){ var eventType="onselectstart" in document.createElement("div") ? "selectstart" : "mousedown"; return function(){ return this.on(eventType + ".ui-disableSelection", function(event){ event.preventDefault(); }); };})(), enableSelection: function(){ return this.off(".ui-disableSelection"); }}); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effect',[ "jquery", "./version" ], factory); }else{ factory(jQuery); }}(function($){ var dataSpace="ui-effects-", dataSpaceStyle="ui-effects-style", dataSpaceAnimated="ui-effects-animated", jQuery=$; $.effects={ effect: {}}; (function(jQuery, undefined){ var stepHooks="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor", rplusequals=/^([\-+])=\s*(\d+\.?\d*)/, stringParsers=[ { re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function(execResult){ return [ execResult[ 1 ], execResult[ 2 ], execResult[ 3 ], execResult[ 4 ] ]; }}, { re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, parse: function(execResult){ return [ execResult[ 1 ] * 2.55, execResult[ 2 ] * 2.55, execResult[ 3 ] * 2.55, execResult[ 4 ] ]; }}, { re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/, parse: function(execResult){ return [ parseInt(execResult[ 1 ], 16), parseInt(execResult[ 2 ], 16), parseInt(execResult[ 3 ], 16) ]; }}, { re: /#([a-f0-9])([a-f0-9])([a-f0-9])/, parse: function(execResult){ return [ parseInt(execResult[ 1 ] + execResult[ 1 ], 16), parseInt(execResult[ 2 ] + execResult[ 2 ], 16), parseInt(execResult[ 3 ] + execResult[ 3 ], 16) ]; }}, { re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/, space: "hsla", parse: function(execResult){ return [ execResult[ 1 ], execResult[ 2 ] / 100, execResult[ 3 ] / 100, execResult[ 4 ] ]; }} ], color=jQuery.Color=function(color, green, blue, alpha){ return new jQuery.Color.fn.parse(color, green, blue, alpha); }, spaces={ rgba: { props: { red: { idx: 0, type: "byte" }, green: { idx: 1, type: "byte" }, blue: { idx: 2, type: "byte" }} }, hsla: { props: { hue: { idx: 0, type: "degrees" }, saturation: { idx: 1, type: "percent" }, lightness: { idx: 2, type: "percent" }} }}, propTypes={ "byte": { floor: true, max: 255 }, "percent": { max: 1 }, "degrees": { mod: 360, floor: true }}, support=color.support={}, supportElem=jQuery("")[ 0 ], colors, each=jQuery.each; supportElem.style.cssText="background-color:rgba(1,1,1,.5)"; support.rgba=supportElem.style.backgroundColor.indexOf("rgba") > -1; each(spaces, function(spaceName, space){ space.cache="_" + spaceName; space.props.alpha={ idx: 3, type: "percent", def: 1 };}); function clamp(value, prop, allowEmpty){ var type=propTypes[ prop.type ]||{}; if(value==null){ return(allowEmpty||!prop.def) ? null:prop.def; } value=type.floor ? ~~value:parseFloat(value); if(isNaN(value)){ return prop.def; } if(type.mod){ return(value + type.mod) % type.mod; } return 0 > value ? 0:type.max < value ? type.max:value; } function stringParse(string){ var inst=color(), rgba=inst._rgba=[]; string=string.toLowerCase(); each(stringParsers, function(i, parser){ var parsed, match=parser.re.exec(string), values=match&&parser.parse(match), spaceName=parser.space||"rgba"; if(values){ parsed=inst[ spaceName ](values); inst[ spaces[ spaceName ].cache ]=parsed[ spaces[ spaceName ].cache ]; rgba=inst._rgba=parsed._rgba; return false; }}); if(rgba.length){ if(rgba.join()==="0,0,0,0"){ jQuery.extend(rgba, colors.transparent); } return inst; } return colors[ string ]; } color.fn=jQuery.extend(color.prototype, { parse: function(red, green, blue, alpha){ if(red===undefined){ this._rgba=[ null, null, null, null ]; return this; } if(red.jquery||red.nodeType){ red=jQuery(red).css(green); green=undefined; } var inst=this, type=jQuery.type(red), rgba=this._rgba=[]; if(green!==undefined){ red=[ red, green, blue, alpha ]; type="array"; } if(type==="string"){ return this.parse(stringParse(red)||colors._default); } if(type==="array"){ each(spaces.rgba.props, function(key, prop){ rgba[ prop.idx ]=clamp(red[ prop.idx ], prop); }); return this; } if(type==="object"){ if(red instanceof color){ each(spaces, function(spaceName, space){ if(red[ space.cache ]){ inst[ space.cache ]=red[ space.cache ].slice(); }}); }else{ each(spaces, function(spaceName, space){ var cache=space.cache; each(space.props, function(key, prop){ if(!inst[ cache ]&&space.to){ if(key==="alpha"||red[ key ]==null){ return; } inst[ cache ]=space.to(inst._rgba); } inst[ cache ][ prop.idx ]=clamp(red[ key ], prop, true); }); if(inst[ cache ]&&jQuery.inArray(null, inst[ cache ].slice(0, 3)) < 0){ inst[ cache ][ 3 ]=1; if(space.from){ inst._rgba=space.from(inst[ cache ]); }} }); } return this; }}, is: function(compare){ var is=color(compare), same=true, inst=this; each(spaces, function(_, space){ var localCache, isCache=is[ space.cache ]; if(isCache){ localCache=inst[ space.cache ]||space.to&&space.to(inst._rgba)||[]; each(space.props, function(_, prop){ if(isCache[ prop.idx ]!=null){ same=(isCache[ prop.idx ]===localCache[ prop.idx ]); return same; }}); } return same; }); return same; }, _space: function(){ var used=[], inst=this; each(spaces, function(spaceName, space){ if(inst[ space.cache ]){ used.push(spaceName); }}); return used.pop(); }, transition: function(other, distance){ var end=color(other), spaceName=end._space(), space=spaces[ spaceName ], startColor=this.alpha()===0 ? color("transparent"):this, start=startColor[ space.cache ]||space.to(startColor._rgba), result=start.slice(); end=end[ space.cache ]; each(space.props, function(key, prop){ var index=prop.idx, startValue=start[ index ], endValue=end[ index ], type=propTypes[ prop.type ]||{}; if(endValue===null){ return; } if(startValue===null){ result[ index ]=endValue; }else{ if(type.mod){ if(endValue - startValue > type.mod / 2){ startValue +=type.mod; }else if(startValue - endValue > type.mod / 2){ startValue -=type.mod; }} result[ index ]=clamp(( endValue - startValue) * distance + startValue, prop); }}); return this[ spaceName ](result); }, blend: function(opaque){ if(this._rgba[ 3 ]===1){ return this; } var rgb=this._rgba.slice(), a=rgb.pop(), blend=color(opaque)._rgba; return color(jQuery.map(rgb, function(v, i){ return(1 - a) * blend[ i ] + a * v; })); }, toRgbaString: function(){ var prefix="rgba(", rgba=jQuery.map(this._rgba, function(v, i){ return v==null ?(i > 2 ? 1:0):v; }); if(rgba[ 3 ]===1){ rgba.pop(); prefix="rgb("; } return prefix + rgba.join() + ")"; }, toHslaString: function(){ var prefix="hsla(", hsla=jQuery.map(this.hsla(), function(v, i){ if(v==null){ v=i > 2 ? 1:0; } if(i&&i < 3){ v=Math.round(v * 100) + "%"; } return v; }); if(hsla[ 3 ]===1){ hsla.pop(); prefix="hsl("; } return prefix + hsla.join() + ")"; }, toHexString: function(includeAlpha){ var rgba=this._rgba.slice(), alpha=rgba.pop(); if(includeAlpha){ rgba.push(~~(alpha * 255)); } return "#" + jQuery.map(rgba, function(v){ v=(v||0).toString(16); return v.length===1 ? "0" + v:v; }).join(""); }, toString: function(){ return this._rgba[ 3 ]===0 ? "transparent":this.toRgbaString(); }}); color.fn.parse.prototype=color.fn; function hue2rgb(p, q, h){ h=(h + 1) % 1; if(h * 6 < 1){ return p +(q - p) * h * 6; } if(h * 2 < 1){ return q; } if(h * 3 < 2){ return p +(q - p) *(( 2 / 3) - h) * 6; } return p; } spaces.hsla.to=function(rgba){ if(rgba[ 0 ]==null||rgba[ 1 ]==null||rgba[ 2 ]==null){ return [ null, null, null, rgba[ 3 ] ]; } var r=rgba[ 0 ] / 255, g=rgba[ 1 ] / 255, b=rgba[ 2 ] / 255, a=rgba[ 3 ], max=Math.max(r, g, b), min=Math.min(r, g, b), diff=max - min, add=max + min, l=add * 0.5, h, s; if(min===max){ h=0; }else if(r===max){ h=(60 *(g - b) / diff) + 360; }else if(g===max){ h=(60 *(b - r) / diff) + 120; }else{ h=(60 *(r - g) / diff) + 240; } if(diff===0){ s=0; }else if(l <=0.5){ s=diff / add; }else{ s=diff /(2 - add); } return [ Math.round(h) % 360, s, l, a==null ? 1:a ]; }; spaces.hsla.from=function(hsla){ if(hsla[ 0 ]==null||hsla[ 1 ]==null||hsla[ 2 ]==null){ return [ null, null, null, hsla[ 3 ] ]; } var h=hsla[ 0 ] / 360, s=hsla[ 1 ], l=hsla[ 2 ], a=hsla[ 3 ], q=l <=0.5 ? l *(1 + s):l + s - l * s, p=2 * l - q; return [ Math.round(hue2rgb(p, q, h +(1 / 3)) * 255), Math.round(hue2rgb(p, q, h) * 255), Math.round(hue2rgb(p, q, h -(1 / 3)) * 255), a ]; }; each(spaces, function(spaceName, space){ var props=space.props, cache=space.cache, to=space.to, from=space.from; color.fn[ spaceName ]=function(value){ if(to&&!this[ cache ]){ this[ cache ]=to(this._rgba); } if(value===undefined){ return this[ cache ].slice(); } var ret, type=jQuery.type(value), arr=(type==="array"||type==="object") ? value:arguments, local=this[ cache ].slice(); each(props, function(key, prop){ var val=arr[ type==="object" ? key:prop.idx ]; if(val==null){ val=local[ prop.idx ]; } local[ prop.idx ]=clamp(val, prop); }); if(from){ ret=color(from(local)); ret[ cache ]=local; return ret; }else{ return color(local); }}; each(props, function(key, prop){ if(color.fn[ key ]){ return; } color.fn[ key ]=function(value){ var vtype=jQuery.type(value), fn=(key==="alpha" ?(this._hsla ? "hsla":"rgba"):spaceName), local=this[ fn ](), cur=local[ prop.idx ], match; if(vtype==="undefined"){ return cur; } if(vtype==="function"){ value=value.call(this, cur); vtype=jQuery.type(value); } if(value==null&&prop.empty){ return this; } if(vtype==="string"){ match=rplusequals.exec(value); if(match){ value=cur + parseFloat(match[ 2 ]) *(match[ 1 ]==="+" ? 1:-1); }} local[ prop.idx ]=value; return this[ fn ](local); };}); }); color.hook=function(hook){ var hooks=hook.split(" "); each(hooks, function(i, hook){ jQuery.cssHooks[ hook ]={ set: function(elem, value){ var parsed, curElem, backgroundColor=""; if(value!=="transparent"&&(jQuery.type(value)!=="string"||(parsed=stringParse(value)))){ value=color(parsed||value); if(!support.rgba&&value._rgba[ 3 ]!==1){ curElem=hook==="backgroundColor" ? elem.parentNode:elem; while ( (backgroundColor===""||backgroundColor==="transparent") && curElem&&curElem.style ){ try { backgroundColor=jQuery.css(curElem, "backgroundColor"); curElem=curElem.parentNode; } catch(e){ }} value=value.blend(backgroundColor&&backgroundColor!=="transparent" ? backgroundColor : "_default"); } value=value.toRgbaString(); } try { elem.style[ hook ]=value; } catch(e){ }} }; jQuery.fx.step[ hook ]=function(fx){ if(!fx.colorInit){ fx.start=color(fx.elem, hook); fx.end=color(fx.end); fx.colorInit=true; } jQuery.cssHooks[ hook ].set(fx.elem, fx.start.transition(fx.end, fx.pos)); };}); }; color.hook(stepHooks); jQuery.cssHooks.borderColor={ expand: function(value){ var expanded={}; each([ "Top", "Right", "Bottom", "Left" ], function(i, part){ expanded[ "border" + part + "Color" ]=value; }); return expanded; }}; colors=jQuery.Color.names={ aqua: "#00ffff", black: "#000000", blue: "#0000ff", fuchsia: "#ff00ff", gray: "#808080", green: "#008000", lime: "#00ff00", maroon: "#800000", navy: "#000080", olive: "#808000", purple: "#800080", red: "#ff0000", silver: "#c0c0c0", teal: "#008080", white: "#ffffff", yellow: "#ffff00", transparent: [ null, null, null, 0 ], _default: "#ffffff" };})(jQuery); (function(){ var classAnimationActions=[ "add", "remove", "toggle" ], shorthandStyles={ border: 1, borderBottom: 1, borderColor: 1, borderLeft: 1, borderRight: 1, borderTop: 1, borderWidth: 1, margin: 1, padding: 1 }; $.each([ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ], function(_, prop){ $.fx.step[ prop ]=function(fx){ if(fx.end!=="none"&&!fx.setAttr||fx.pos===1&&!fx.setAttr){ jQuery.style(fx.elem, prop, fx.end); fx.setAttr=true; }};}); function getElementStyles(elem){ var key, len, style=elem.ownerDocument.defaultView ? elem.ownerDocument.defaultView.getComputedStyle(elem, null) : elem.currentStyle, styles={}; if(style&&style.length&&style[ 0 ]&&style[ style[ 0 ] ]){ len=style.length; while(len--){ key=style[ len ]; if(typeof style[ key ]==="string"){ styles[ $.camelCase(key) ]=style[ key ]; }} }else{ for(key in style){ if(typeof style[ key ]==="string"){ styles[ key ]=style[ key ]; }} } return styles; } function styleDifference(oldStyle, newStyle){ var diff={}, name, value; for(name in newStyle){ value=newStyle[ name ]; if(oldStyle[ name ]!==value){ if(!shorthandStyles[ name ]){ if($.fx.step[ name ]||!isNaN(parseFloat(value))){ diff[ name ]=value; }} }} return diff; } if(!$.fn.addBack){ $.fn.addBack=function(selector){ return this.add(selector==null ? this.prevObject:this.prevObject.filter(selector) ); };} $.effects.animateClass=function(value, duration, easing, callback){ var o=$.speed(duration, easing, callback); return this.queue(function(){ var animated=$(this), baseClass=animated.attr("class")||"", applyClassChange, allAnimations=o.children ? animated.find("*").addBack():animated; allAnimations=allAnimations.map(function(){ var el=$(this); return { el: el, start: getElementStyles(this) };}); applyClassChange=function(){ $.each(classAnimationActions, function(i, action){ if(value[ action ]){ animated[ action + "Class" ](value[ action ]); }}); }; applyClassChange(); allAnimations=allAnimations.map(function(){ this.end=getElementStyles(this.el[ 0 ]); this.diff=styleDifference(this.start, this.end); return this; }); animated.attr("class", baseClass); allAnimations=allAnimations.map(function(){ var styleInfo=this, dfd=$.Deferred(), opts=$.extend({}, o, { queue: false, complete: function(){ dfd.resolve(styleInfo); }}); this.el.animate(this.diff, opts); return dfd.promise(); }); $.when.apply($, allAnimations.get()).done(function(){ applyClassChange(); $.each(arguments, function(){ var el=this.el; $.each(this.diff, function(key){ el.css(key, ""); }); }); o.complete.call(animated[ 0 ]); }); }); }; $.fn.extend({ addClass:(function(orig){ return function(classNames, speed, easing, callback){ return speed ? $.effects.animateClass.call(this, { add: classNames }, speed, easing, callback) : orig.apply(this, arguments); };})($.fn.addClass), removeClass:(function(orig){ return function(classNames, speed, easing, callback){ return arguments.length > 1 ? $.effects.animateClass.call(this, { remove: classNames }, speed, easing, callback) : orig.apply(this, arguments); };})($.fn.removeClass), toggleClass:(function(orig){ return function(classNames, force, speed, easing, callback){ if(typeof force==="boolean"||force===undefined){ if(!speed){ return orig.apply(this, arguments); }else{ return $.effects.animateClass.call(this, (force ? { add: classNames }:{ remove: classNames }), speed, easing, callback); }}else{ return $.effects.animateClass.call(this, { toggle: classNames }, force, speed, easing); }};})($.fn.toggleClass), switchClass: function(remove, add, speed, easing, callback){ return $.effects.animateClass.call(this, { add: add, remove: remove }, speed, easing, callback); }}); })(); (function(){ if($.expr&&$.expr.filters&&$.expr.filters.animated){ $.expr.filters.animated=(function(orig){ return function(elem){ return !!$(elem).data(dataSpaceAnimated)||orig(elem); };})($.expr.filters.animated); } if($.uiBackCompat!==false){ $.extend($.effects, { save: function(element, set){ var i=0, length=set.length; for(; i < length; i++){ if(set[ i ]!==null){ element.data(dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ]); }} }, restore: function(element, set){ var val, i=0, length=set.length; for(; i < length; i++){ if(set[ i ]!==null){ val=element.data(dataSpace + set[ i ]); element.css(set[ i ], val); }} }, setMode: function(el, mode){ if(mode==="toggle"){ mode=el.is(":hidden") ? "show":"hide"; } return mode; }, createWrapper: function(element){ if(element.parent().is(".ui-effects-wrapper")){ return element.parent(); } var props={ width: element.outerWidth(true), height: element.outerHeight(true), "float": element.css("float") }, wrapper=$("
") .addClass("ui-effects-wrapper") .css({ fontSize: "100%", background: "transparent", border: "none", margin: 0, padding: 0 }), size={ width: element.width(), height: element.height() }, active=document.activeElement; try { active.id; } catch(e){ active=document.body; } element.wrap(wrapper); if(element[ 0 ]===active||$.contains(element[ 0 ], active)){ $(active).trigger("focus"); } wrapper=element.parent(); if(element.css("position")==="static"){ wrapper.css({ position: "relative" }); element.css({ position: "relative" }); }else{ $.extend(props, { position: element.css("position"), zIndex: element.css("z-index") }); $.each([ "top", "left", "bottom", "right" ], function(i, pos){ props[ pos ]=element.css(pos); if(isNaN(parseInt(props[ pos ], 10))){ props[ pos ]="auto"; }}); element.css({ position: "relative", top: 0, left: 0, right: "auto", bottom: "auto" }); } element.css(size); return wrapper.css(props).show(); }, removeWrapper: function(element){ var active=document.activeElement; if(element.parent().is(".ui-effects-wrapper")){ element.parent().replaceWith(element); if(element[ 0 ]===active||$.contains(element[ 0 ], active)){ $(active).trigger("focus"); }} return element; }}); } $.extend($.effects, { version: "@VERSION", define: function(name, mode, effect){ if(!effect){ effect=mode; mode="effect"; } $.effects.effect[ name ]=effect; $.effects.effect[ name ].mode=mode; return effect; }, scaledDimensions: function(element, percent, direction){ if(percent===0){ return { height: 0, width: 0, outerHeight: 0, outerWidth: 0 };} var x=direction!=="horizontal" ?(( percent||100) / 100):1, y=direction!=="vertical" ?(( percent||100) / 100):1; return { height: element.height() * y, width: element.width() * x, outerHeight: element.outerHeight() * y, outerWidth: element.outerWidth() * x };}, clipToBox: function(animation){ return { width: animation.clip.right - animation.clip.left, height: animation.clip.bottom - animation.clip.top, left: animation.clip.left, top: animation.clip.top };}, unshift: function(element, queueLength, count){ var queue=element.queue(); if(queueLength > 1){ queue.splice.apply(queue, [ 1, 0 ].concat(queue.splice(queueLength, count))); } element.dequeue(); }, saveStyle: function(element){ element.data(dataSpaceStyle, element[ 0 ].style.cssText); }, restoreStyle: function(element){ element[ 0 ].style.cssText=element.data(dataSpaceStyle)||""; element.removeData(dataSpaceStyle); }, mode: function(element, mode){ var hidden=element.is(":hidden"); if(mode==="toggle"){ mode=hidden ? "show":"hide"; } if(hidden ? mode==="hide":mode==="show"){ mode="none"; } return mode; }, getBaseline: function(origin, original){ var y, x; switch(origin[ 0 ]){ case "top": y=0; break; case "middle": y=0.5; break; case "bottom": y=1; break; default: y=origin[ 0 ] / original.height; } switch(origin[ 1 ]){ case "left": x=0; break; case "center": x=0.5; break; case "right": x=1; break; default: x=origin[ 1 ] / original.width; } return { x: x, y: y };}, createPlaceholder: function(element){ var placeholder, cssPosition=element.css("position"), position=element.position(); element.css({ marginTop: element.css("marginTop"), marginBottom: element.css("marginBottom"), marginLeft: element.css("marginLeft"), marginRight: element.css("marginRight") }) .outerWidth(element.outerWidth()) .outerHeight(element.outerHeight()); if(/^(static|relative)/.test(cssPosition)){ cssPosition="absolute"; placeholder=$("<" + element[ 0 ].nodeName + ">").insertAfter(element).css({ display: /^(inline|ruby)/.test(element.css("display")) ? "inline-block":"block", visibility: "hidden", marginTop: element.css("marginTop"), marginBottom: element.css("marginBottom"), marginLeft: element.css("marginLeft"), marginRight: element.css("marginRight"), "float": element.css("float") }) .outerWidth(element.outerWidth()) .outerHeight(element.outerHeight()) .addClass("ui-effects-placeholder"); element.data(dataSpace + "placeholder", placeholder); } element.css({ position: cssPosition, left: position.left, top: position.top }); return placeholder; }, removePlaceholder: function(element){ var dataKey=dataSpace + "placeholder", placeholder=element.data(dataKey); if(placeholder){ placeholder.remove(); element.removeData(dataKey); }}, cleanUp: function(element){ $.effects.restoreStyle(element); $.effects.removePlaceholder(element); }, setTransition: function(element, list, factor, value){ value=value||{}; $.each(list, function(i, x){ var unit=element.cssUnit(x); if(unit[ 0 ] > 0){ value[ x ]=unit[ 0 ] * factor + unit[ 1 ]; }}); return value; }}); function _normalizeArguments(effect, options, speed, callback){ if($.isPlainObject(effect)){ options=effect; effect=effect.effect; } effect={ effect: effect }; if(options==null){ options={};} if($.isFunction(options)){ callback=options; speed=null; options={};} if(typeof options==="number"||$.fx.speeds[ options ]){ callback=speed; speed=options; options={};} if($.isFunction(speed)){ callback=speed; speed=null; } if(options){ $.extend(effect, options); } speed=speed||options.duration; effect.duration=$.fx.off ? 0 : typeof speed==="number" ? speed : speed in $.fx.speeds ? $.fx.speeds[ speed ] : $.fx.speeds._default; effect.complete=callback||options.complete; return effect; } function standardAnimationOption(option){ if(!option||typeof option==="number"||$.fx.speeds[ option ]){ return true; } if(typeof option==="string"&&!$.effects.effect[ option ]){ return true; } if($.isFunction(option)){ return true; } if(typeof option==="object"&&!option.effect){ return true; } return false; } $.fn.extend({ effect: function(){ var args=_normalizeArguments.apply(this, arguments), effectMethod=$.effects.effect[ args.effect ], defaultMode=effectMethod.mode, queue=args.queue, queueName=queue||"fx", complete=args.complete, mode=args.mode, modes=[], prefilter=function(next){ var el=$(this), normalizedMode=$.effects.mode(el, mode)||defaultMode; el.data(dataSpaceAnimated, true); modes.push(normalizedMode); if(defaultMode&&(normalizedMode==="show" || (normalizedMode===defaultMode&&normalizedMode==="hide"))){ el.show(); } if(!defaultMode||normalizedMode!=="none"){ $.effects.saveStyle(el); } if($.isFunction(next)){ next(); }}; if($.fx.off||!effectMethod){ if(mode){ return this[ mode ](args.duration, complete); }else{ return this.each(function(){ if(complete){ complete.call(this); }}); }} function run(next){ var elem=$(this); function cleanup(){ elem.removeData(dataSpaceAnimated); $.effects.cleanUp(elem); if(args.mode==="hide"){ elem.hide(); } done(); } function done(){ if($.isFunction(complete)){ complete.call(elem[ 0 ]); } if($.isFunction(next)){ next(); }} args.mode=modes.shift(); if($.uiBackCompat!==false&&!defaultMode){ if(elem.is(":hidden") ? mode==="hide":mode==="show"){ elem[ mode ](); done(); }else{ effectMethod.call(elem[ 0 ], args, done); }}else{ if(args.mode==="none"){ elem[ mode ](); done(); }else{ effectMethod.call(elem[ 0 ], args, cleanup); }} } return queue===false ? this.each(prefilter).each(run) : this.queue(queueName, prefilter).queue(queueName, run); }, show:(function(orig){ return function(option){ if(standardAnimationOption(option)){ return orig.apply(this, arguments); }else{ var args=_normalizeArguments.apply(this, arguments); args.mode="show"; return this.effect.call(this, args); }};})($.fn.show), hide:(function(orig){ return function(option){ if(standardAnimationOption(option)){ return orig.apply(this, arguments); }else{ var args=_normalizeArguments.apply(this, arguments); args.mode="hide"; return this.effect.call(this, args); }};})($.fn.hide), toggle:(function(orig){ return function(option){ if(standardAnimationOption(option)||typeof option==="boolean"){ return orig.apply(this, arguments); }else{ var args=_normalizeArguments.apply(this, arguments); args.mode="toggle"; return this.effect.call(this, args); }};})($.fn.toggle), cssUnit: function(key){ var style=this.css(key), val=[]; $.each([ "em", "px", "%", "pt" ], function(i, unit){ if(style.indexOf(unit) > 0){ val=[ parseFloat(style), unit ]; }}); return val; }, cssClip: function(clipObj){ return clipObj ? this.css("clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " + clipObj.bottom + "px " + clipObj.left + "px)") : parseClip(this.css("clip"), this); }, transfer: function(options, done){ var element=$(this), target=$(options.to), targetFixed=target.css("position")==="fixed", body=$("body"), fixTop=targetFixed ? body.scrollTop():0, fixLeft=targetFixed ? body.scrollLeft():0, endPosition=target.offset(), animation={ top: endPosition.top - fixTop, left: endPosition.left - fixLeft, height: target.innerHeight(), width: target.innerWidth() }, startPosition=element.offset(), transfer=$("") .appendTo("body") .addClass(options.className) .css({ top: startPosition.top - fixTop, left: startPosition.left - fixLeft, height: element.innerHeight(), width: element.innerWidth(), position: targetFixed ? "fixed":"absolute" }) .animate(animation, options.duration, options.easing, function(){ transfer.remove(); if($.isFunction(done)){ done(); }}); }}); function parseClip(str, element){ var outerWidth=element.outerWidth(), outerHeight=element.outerHeight(), clipRegex=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/, values=clipRegex.exec(str)||[ "", 0, outerWidth, outerHeight, 0 ]; return { top: parseFloat(values[ 1 ])||0, right: values[ 2 ]==="auto" ? outerWidth:parseFloat(values[ 2 ]), bottom: values[ 3 ]==="auto" ? outerHeight:parseFloat(values[ 3 ]), left: parseFloat(values[ 4 ])||0 };} $.fx.step.clip=function(fx){ if(!fx.clipInit){ fx.start=$(fx.elem).cssClip(); if(typeof fx.end==="string"){ fx.end=parseClip(fx.end, fx.elem); } fx.clipInit=true; } $(fx.elem).cssClip({ top: fx.pos *(fx.end.top - fx.start.top) + fx.start.top, right: fx.pos *(fx.end.right - fx.start.right) + fx.start.right, bottom: fx.pos *(fx.end.bottom - fx.start.bottom) + fx.start.bottom, left: fx.pos *(fx.end.left - fx.start.left) + fx.start.left }); };})(); (function(){ var baseEasings={}; $.each([ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function(i, name){ baseEasings[ name ]=function(p){ return Math.pow(p, i + 2); };}); $.extend(baseEasings, { Sine: function(p){ return 1 - Math.cos(p * Math.PI / 2); }, Circ: function(p){ return 1 - Math.sqrt(1 - p * p); }, Elastic: function(p){ return p===0||p===1 ? p : -Math.pow(2, 8 *(p - 1)) * Math.sin(((p - 1) * 80 - 7.5) * Math.PI / 15); }, Back: function(p){ return p * p *(3 * p - 2); }, Bounce: function(p){ var pow2, bounce=4; while(p <(( pow2=Math.pow(2, --bounce)) - 1) / 11){} return 1 / Math.pow(4, 3 - bounce) - 7.5625 * Math.pow(( pow2 * 3 - 2) / 22 - p, 2); }}); $.each(baseEasings, function(name, easeIn){ $.easing[ "easeIn" + name ]=easeIn; $.easing[ "easeOut" + name ]=function(p){ return 1 - easeIn(1 - p); }; $.easing[ "easeInOut" + name ]=function(p){ return p < 0.5 ? easeIn(p * 2) / 2 : 1 - easeIn(p * -2 + 2) / 2; };}); })(); return $.effects; })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-blind.js',[ "jquery", "../version", "../effect" ], factory); }else{ factory(jQuery); }}(function($){ return $.effects.define("blind", "hide", function(options, done){ var map={ up: [ "bottom", "top" ], vertical: [ "bottom", "top" ], down: [ "top", "bottom" ], left: [ "right", "left" ], horizontal: [ "right", "left" ], right: [ "left", "right" ] }, element=$(this), direction=options.direction||"up", start=element.cssClip(), animate={ clip: $.extend({}, start) }, placeholder=$.effects.createPlaceholder(element); animate.clip[ map[ direction ][ 0 ] ]=animate.clip[ map[ direction ][ 1 ] ]; if(options.mode==="show"){ element.cssClip(animate.clip); if(placeholder){ placeholder.css($.effects.clipToBox(animate)); } animate.clip=start; } if(placeholder){ placeholder.animate($.effects.clipToBox(animate), options.duration, options.easing); } element.animate(animate, { queue: false, duration: options.duration, easing: options.easing, complete: done }); }); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-bounce.js',[ "jquery", "../version", "../effect" ], factory); }else{ factory(jQuery); }}(function($){ return $.effects.define("bounce", function(options, done){ var upAnim, downAnim, refValue, element=$(this), mode=options.mode, hide=mode==="hide", show=mode==="show", direction=options.direction||"up", distance=options.distance, times=options.times||5, anims=times * 2 +(show||hide ? 1:0), speed=options.duration / anims, easing=options.easing, ref=(direction==="up"||direction==="down") ? "top":"left", motion=(direction==="up"||direction==="left"), i=0, queuelen=element.queue().length; $.effects.createPlaceholder(element); refValue=element.css(ref); if(!distance){ distance=element[ ref==="top" ? "outerHeight":"outerWidth" ]() / 3; } if(show){ downAnim={ opacity: 1 }; downAnim[ ref ]=refValue; element .css("opacity", 0) .css(ref, motion ? -distance * 2:distance * 2) .animate(downAnim, speed, easing); } if(hide){ distance=distance / Math.pow(2, times - 1); } downAnim={}; downAnim[ ref ]=refValue; for(; i < times; i++){ upAnim={}; upAnim[ ref ]=(motion ? "-=":"+=") + distance; element .animate(upAnim, speed, easing) .animate(downAnim, speed, easing); distance=hide ? distance * 2:distance / 2; } if(hide){ upAnim={ opacity: 0 }; upAnim[ ref ]=(motion ? "-=":"+=") + distance; element.animate(upAnim, speed, easing); } element.queue(done); $.effects.unshift(element, queuelen, anims + 1); }); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-clip.js',[ "jquery", "../version", "../effect" ], factory); }else{ factory(jQuery); }}(function($){ return $.effects.define("clip", "hide", function(options, done){ var start, animate={}, element=$(this), direction=options.direction||"vertical", both=direction==="both", horizontal=both||direction==="horizontal", vertical=both||direction==="vertical"; start=element.cssClip(); animate.clip={ top: vertical ?(start.bottom - start.top) / 2:start.top, right: horizontal ?(start.right - start.left) / 2:start.right, bottom: vertical ?(start.bottom - start.top) / 2:start.bottom, left: horizontal ?(start.right - start.left) / 2:start.left }; $.effects.createPlaceholder(element); if(options.mode==="show"){ element.cssClip(animate.clip); animate.clip=start; } element.animate(animate, { queue: false, duration: options.duration, easing: options.easing, complete: done }); }); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-drop.js',[ "jquery", "../version", "../effect" ], factory); }else{ factory(jQuery); }}(function($){ return $.effects.define("drop", "hide", function(options, done){ var distance, element=$(this), mode=options.mode, show=mode==="show", direction=options.direction||"left", ref=(direction==="up"||direction==="down") ? "top":"left", motion=(direction==="up"||direction==="left") ? "-=":"+=", oppositeMotion=(motion==="+=") ? "-=":"+=", animation={ opacity: 0 }; $.effects.createPlaceholder(element); distance=options.distance||element[ ref==="top" ? "outerHeight":"outerWidth" ](true) / 2; animation[ ref ]=motion + distance; if(show){ element.css(animation); animation[ ref ]=oppositeMotion + distance; animation.opacity=1; } element.animate(animation, { queue: false, duration: options.duration, easing: options.easing, complete: done }); }); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-explode.js',[ "jquery", "../version", "../effect" ], factory); }else{ factory(jQuery); }}(function($){ return $.effects.define("explode", "hide", function(options, done){ var i, j, left, top, mx, my, rows=options.pieces ? Math.round(Math.sqrt(options.pieces)):3, cells=rows, element=$(this), mode=options.mode, show=mode==="show", offset=element.show().css("visibility", "hidden").offset(), width=Math.ceil(element.outerWidth() / cells), height=Math.ceil(element.outerHeight() / rows), pieces=[]; function childComplete(){ pieces.push(this); if(pieces.length===rows * cells){ animComplete(); }} for(i=0; i < rows; i++){ top=offset.top + i * height; my=i -(rows - 1) / 2; for(j=0; j < cells; j++){ left=offset.left + j * width; mx=j -(cells - 1) / 2; element .clone() .appendTo("body") .wrap("") .css({ position: "absolute", visibility: "visible", left: -j * width, top: -i * height }) .parent() .addClass("ui-effects-explode") .css({ position: "absolute", overflow: "hidden", width: width, height: height, left: left +(show ? mx * width:0), top: top +(show ? my * height:0), opacity: show ? 0:1 }) .animate({ left: left +(show ? 0:mx * width), top: top +(show ? 0:my * height), opacity: show ? 1:0 }, options.duration||500, options.easing, childComplete); }} function animComplete(){ element.css({ visibility: "visible" }); $(pieces).remove(); done(); }}); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-fade.js',[ "jquery", "../version", "../effect" ], factory); }else{ factory(jQuery); }}(function($){ return $.effects.define("fade", "toggle", function(options, done){ var show=options.mode==="show"; $(this) .css("opacity", show ? 0:1) .animate({ opacity: show ? 1:0 }, { queue: false, duration: options.duration, easing: options.easing, complete: done }); }); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-fold.js',[ "jquery", "../version", "../effect" ], factory); }else{ factory(jQuery); }}(function($){ return $.effects.define("fold", "hide", function(options, done){ var element=$(this), mode=options.mode, show=mode==="show", hide=mode==="hide", size=options.size||15, percent=/([0-9]+)%/.exec(size), horizFirst = !!options.horizFirst, ref=horizFirst ? [ "right", "bottom" ]:[ "bottom", "right" ], duration=options.duration / 2, placeholder=$.effects.createPlaceholder(element), start=element.cssClip(), animation1={ clip: $.extend({}, start) }, animation2={ clip: $.extend({}, start) }, distance=[ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ], queuelen=element.queue().length; if(percent){ size=parseInt(percent[ 1 ], 10) / 100 * distance[ hide ? 0:1 ]; } animation1.clip[ ref[ 0 ] ]=size; animation2.clip[ ref[ 0 ] ]=size; animation2.clip[ ref[ 1 ] ]=0; if(show){ element.cssClip(animation2.clip); if(placeholder){ placeholder.css($.effects.clipToBox(animation2)); } animation2.clip=start; } element .queue(function(next){ if(placeholder){ placeholder .animate($.effects.clipToBox(animation1), duration, options.easing) .animate($.effects.clipToBox(animation2), duration, options.easing); } next(); }) .animate(animation1, duration, options.easing) .animate(animation2, duration, options.easing) .queue(done); $.effects.unshift(element, queuelen, 4); }); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-highlight.js',[ "jquery", "../version", "../effect" ], factory); }else{ factory(jQuery); }}(function($){ return $.effects.define("highlight", "show", function(options, done){ var element=$(this), animation={ backgroundColor: element.css("backgroundColor") }; if(options.mode==="hide"){ animation.opacity=0; } $.effects.saveStyle(element); element .css({ backgroundImage: "none", backgroundColor: options.color||"#ffff99" }) .animate(animation, { queue: false, duration: options.duration, easing: options.easing, complete: done }); }); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-size.js',[ "jquery", "../version", "../effect" ], factory); }else{ factory(jQuery); }}(function($){ return $.effects.define("size", function(options, done){ var baseline, factor, temp, element=$(this), cProps=[ "fontSize" ], vProps=[ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ], hProps=[ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ], mode=options.mode, restore=mode!=="effect", scale=options.scale||"both", origin=options.origin||[ "middle", "center" ], position=element.css("position"), pos=element.position(), original=$.effects.scaledDimensions(element), from=options.from||original, to=options.to||$.effects.scaledDimensions(element, 0); $.effects.createPlaceholder(element); if(mode==="show"){ temp=from; from=to; to=temp; } factor={ from: { y: from.height / original.height, x: from.width / original.width }, to: { y: to.height / original.height, x: to.width / original.width }}; if(scale==="box"||scale==="both"){ if(factor.from.y!==factor.to.y){ from=$.effects.setTransition(element, vProps, factor.from.y, from); to=$.effects.setTransition(element, vProps, factor.to.y, to); } if(factor.from.x!==factor.to.x){ from=$.effects.setTransition(element, hProps, factor.from.x, from); to=$.effects.setTransition(element, hProps, factor.to.x, to); }} if(scale==="content"||scale==="both"){ if(factor.from.y!==factor.to.y){ from=$.effects.setTransition(element, cProps, factor.from.y, from); to=$.effects.setTransition(element, cProps, factor.to.y, to); }} if(origin){ baseline=$.effects.getBaseline(origin, original); from.top=(original.outerHeight - from.outerHeight) * baseline.y + pos.top; from.left=(original.outerWidth - from.outerWidth) * baseline.x + pos.left; to.top=(original.outerHeight - to.outerHeight) * baseline.y + pos.top; to.left=(original.outerWidth - to.outerWidth) * baseline.x + pos.left; } element.css(from); if(scale==="content"||scale==="both"){ vProps=vProps.concat([ "marginTop", "marginBottom" ]).concat(cProps); hProps=hProps.concat([ "marginLeft", "marginRight" ]); element.find("*[width]").each(function(){ var child=$(this), childOriginal=$.effects.scaledDimensions(child), childFrom={ height: childOriginal.height * factor.from.y, width: childOriginal.width * factor.from.x, outerHeight: childOriginal.outerHeight * factor.from.y, outerWidth: childOriginal.outerWidth * factor.from.x }, childTo={ height: childOriginal.height * factor.to.y, width: childOriginal.width * factor.to.x, outerHeight: childOriginal.height * factor.to.y, outerWidth: childOriginal.width * factor.to.x }; if(factor.from.y!==factor.to.y){ childFrom=$.effects.setTransition(child, vProps, factor.from.y, childFrom); childTo=$.effects.setTransition(child, vProps, factor.to.y, childTo); } if(factor.from.x!==factor.to.x){ childFrom=$.effects.setTransition(child, hProps, factor.from.x, childFrom); childTo=$.effects.setTransition(child, hProps, factor.to.x, childTo); } if(restore){ $.effects.saveStyle(child); } child.css(childFrom); child.animate(childTo, options.duration, options.easing, function(){ if(restore){ $.effects.restoreStyle(child); }}); }); } element.animate(to, { queue: false, duration: options.duration, easing: options.easing, complete: function(){ var offset=element.offset(); if(to.opacity===0){ element.css("opacity", from.opacity); } if(!restore){ element .css("position", position==="static" ? "relative":position) .offset(offset); $.effects.saveStyle(element); } done(); }}); }); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-scale.js',[ "jquery", "../version", "../effect", "./effect-size" ], factory); }else{ factory(jQuery); }}(function($){ return $.effects.define("scale", function(options, done){ var el=$(this), mode=options.mode, percent=parseInt(options.percent, 10) || (parseInt(options.percent, 10)===0 ? 0:(mode!=="effect" ? 0:100)), newOptions=$.extend(true, { from: $.effects.scaledDimensions(el), to: $.effects.scaledDimensions(el, percent, options.direction||"both"), origin: options.origin||[ "middle", "center" ] }, options); if(options.fade){ newOptions.from.opacity=1; newOptions.to.opacity=0; } $.effects.effect.size.call(this, newOptions, done); }); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-puff.js',[ "jquery", "../version", "../effect", "./effect-scale" ], factory); }else{ factory(jQuery); }}(function($){ return $.effects.define("puff", "hide", function(options, done){ var newOptions=$.extend(true, {}, options, { fade: true, percent: parseInt(options.percent, 10)||150 }); $.effects.effect.scale.call(this, newOptions, done); }); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-pulsate.js',[ "jquery", "../version", "../effect" ], factory); }else{ factory(jQuery); }}(function($){ return $.effects.define("pulsate", "show", function(options, done){ var element=$(this), mode=options.mode, show=mode==="show", hide=mode==="hide", showhide=show||hide, anims=(( options.times||5) * 2) +(showhide ? 1:0), duration=options.duration / anims, animateTo=0, i=1, queuelen=element.queue().length; if(show||!element.is(":visible")){ element.css("opacity", 0).show(); animateTo=1; } for(; i < anims; i++){ element.animate({ opacity: animateTo }, duration, options.easing); animateTo=1 - animateTo; } element.animate({ opacity: animateTo }, duration, options.easing); element.queue(done); $.effects.unshift(element, queuelen, anims + 1); }); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-shake.js',[ "jquery", "../version", "../effect" ], factory); }else{ factory(jQuery); }}(function($){ return $.effects.define("shake", function(options, done){ var i=1, element=$(this), direction=options.direction||"left", distance=options.distance||20, times=options.times||3, anims=times * 2 + 1, speed=Math.round(options.duration / anims), ref=(direction==="up"||direction==="down") ? "top":"left", positiveMotion=(direction==="up"||direction==="left"), animation={}, animation1={}, animation2={}, queuelen=element.queue().length; $.effects.createPlaceholder(element); animation[ ref ]=(positiveMotion ? "-=":"+=") + distance; animation1[ ref ]=(positiveMotion ? "+=":"-=") + distance * 2; animation2[ ref ]=(positiveMotion ? "-=":"+=") + distance * 2; element.animate(animation, speed, options.easing); for(; i < times; i++){ element.animate(animation1, speed, options.easing).animate(animation2, speed, options.easing); } element .animate(animation1, speed, options.easing) .animate(animation, speed / 2, options.easing) .queue(done); $.effects.unshift(element, queuelen, anims + 1); }); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-slide.js',[ "jquery", "../version", "../effect" ], factory); }else{ factory(jQuery); }}(function($){ return $.effects.define("slide", "show", function(options, done){ var startClip, startRef, element=$(this), map={ up: [ "bottom", "top" ], down: [ "top", "bottom" ], left: [ "right", "left" ], right: [ "left", "right" ] }, mode=options.mode, direction=options.direction||"left", ref=(direction==="up"||direction==="down") ? "top":"left", positiveMotion=(direction==="up"||direction==="left"), distance=options.distance||element[ ref==="top" ? "outerHeight":"outerWidth" ](true), animation={}; $.effects.createPlaceholder(element); startClip=element.cssClip(); startRef=element.position()[ ref ]; animation[ ref ]=(positiveMotion ? -1:1) * distance + startRef; animation.clip=element.cssClip(); animation.clip[ map[ direction ][ 1 ] ]=animation.clip[ map[ direction ][ 0 ] ]; if(mode==="show"){ element.cssClip(animation.clip); element.css(ref, animation[ ref ]); animation.clip=startClip; animation[ ref ]=startRef; } element.animate(animation, { queue: false, duration: options.duration, easing: options.easing, complete: done }); }); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/effects/effect-transfer.js',[ "jquery", "../version", "../effect" ], factory); }else{ factory(jQuery); }}(function($){ var effect; if($.uiBackCompat!==false){ effect=$.effects.define("transfer", function(options, done){ $(this).transfer(options, done); }); } return effect; })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/escape-selector',[ "jquery", "./version" ], factory); }else{ factory(jQuery); }}(function($){ return $.ui.escapeSelector=(function(){ var selectorEscape=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g; return function(selector){ return selector.replace(selectorEscape, "\\$1"); };})(); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/focusable',[ "jquery", "./version" ], factory); }else{ factory(jQuery); }}(function($){ $.ui.focusable=function(element, hasTabindex){ var map, mapName, img, nodeName=element.nodeName.toLowerCase(); if("area"===nodeName){ map=element.parentNode; mapName=map.name; if(!element.href||!mapName||map.nodeName.toLowerCase()!=="map"){ return false; } img=$("img[usemap='#" + mapName + "']"); return img.length > 0&&img.is(":visible"); } return(/^(input|select|textarea|button|object)$/.test(nodeName) ? !element.disabled : "a"===nodeName ? element.href||hasTabindex : hasTabindex) && $(element).is(":visible")&&visible($(element)); }; function visible(element){ var visibility=element.css("visibility"); while(visibility==="inherit"){ element=element.parent(); visibility=element.css("visibility"); } return visibility!=="hidden"; } $.extend($.expr[ ":" ], { focusable: function(element){ return $.ui.focusable(element, $.attr(element, "tabindex")!=null); }}); return $.ui.focusable; })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/form.js',[ "jquery", "./version" ], factory); }else{ factory(jQuery); }}(function($){ return $.fn.form=function(){ return typeof this[ 0 ].form==="string" ? this.closest("form"):$(this[ 0 ].form); };})); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/form-reset-mixin',[ "jquery", "./form", "./version" ], factory); }else{ factory(jQuery); }}(function($){ return $.ui.formResetMixin={ _formResetHandler: function(){ var form=$(this); setTimeout(function(){ var instances=form.data("ui-form-reset-instances"); $.each(instances, function(){ this.refresh(); }); }); }, _bindFormResetHandler: function(){ this.form=this.element.form(); if(!this.form.length){ return; } var instances=this.form.data("ui-form-reset-instances")||[]; if(!instances.length){ this.form.on("reset.ui-form-reset", this._formResetHandler); } instances.push(this); this.form.data("ui-form-reset-instances", instances); }, _unbindFormResetHandler: function(){ if(!this.form.length){ return; } var instances=this.form.data("ui-form-reset-instances"); instances.splice($.inArray(this, instances), 1); if(instances.length){ this.form.data("ui-form-reset-instances", instances); }else{ this.form .removeData("ui-form-reset-instances") .off("reset.ui-form-reset"); }} };})); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/ie',[ "jquery", "./version" ], factory); }else{ factory(jQuery); }}(function($){ return $.ui.ie = !!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()); })); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/jquery-1-7.js',[ "jquery", "./version" ], factory); }else{ factory(jQuery); }}(function($){ if($.fn.jquery.substring(0, 3)==="1.7"){ $.each([ "Width", "Height" ], function(i, name){ var side=name==="Width" ? [ "Left", "Right" ]:[ "Top", "Bottom" ], type=name.toLowerCase(), orig={ innerWidth: $.fn.innerWidth, innerHeight: $.fn.innerHeight, outerWidth: $.fn.outerWidth, outerHeight: $.fn.outerHeight }; function reduce(elem, size, border, margin){ $.each(side, function(){ size -=parseFloat($.css(elem, "padding" + this))||0; if(border){ size -=parseFloat($.css(elem, "border" + this + "Width"))||0; } if(margin){ size -=parseFloat($.css(elem, "margin" + this))||0; }}); return size; } $.fn[ "inner" + name ]=function(size){ if(size===undefined){ return orig[ "inner" + name ].call(this); } return this.each(function(){ $(this).css(type, reduce(this, size) + "px"); }); }; $.fn[ "outer" + name ]=function(size, margin){ if(typeof size!=="number"){ return orig[ "outer" + name ].call(this, size); } return this.each(function(){ $(this).css(type, reduce(this, size, true, margin) + "px"); }); };}); $.fn.addBack=function(selector){ return this.add(selector==null ? this.prevObject:this.prevObject.filter(selector) ); };}})); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/keycode',[ "jquery", "./version" ], factory); }else{ factory(jQuery); }}(function($){ return $.ui.keyCode={ BACKSPACE: 8, COMMA: 188, DELETE: 46, DOWN: 40, END: 35, ENTER: 13, ESCAPE: 27, HOME: 36, LEFT: 37, PAGE_DOWN: 34, PAGE_UP: 33, PERIOD: 190, RIGHT: 39, SPACE: 32, TAB: 9, UP: 38 };})); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/labels',[ "jquery", "./version", "./escape-selector" ], factory); }else{ factory(jQuery); }}(function($){ return $.fn.labels=function(){ var ancestor, selector, id, labels, ancestors; if(this[ 0 ].labels&&this[ 0 ].labels.length){ return this.pushStack(this[ 0 ].labels); } labels=this.eq(0).parents("label"); id=this.attr("id"); if(id){ ancestor=this.eq(0).parents().last(); ancestors=ancestor.add(ancestor.length ? ancestor.siblings():this.siblings()); selector="label[for='" + $.ui.escapeSelector(id) + "']"; labels=labels.add(ancestors.find(selector).addBack(selector)); } return this.pushStack(labels); };})); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/plugin',[ "jquery", "./version" ], factory); }else{ factory(jQuery); }}(function($){ return $.ui.plugin={ add: function(module, option, set){ var i, proto=$.ui[ module ].prototype; for(i in set){ proto.plugins[ i ]=proto.plugins[ i ]||[]; proto.plugins[ i ].push([ option, set[ i ] ]); }}, call: function(instance, name, args, allowDisconnected){ var i, set=instance.plugins[ name ]; if(!set){ return; } if(!allowDisconnected&&(!instance.element[ 0 ].parentNode||instance.element[ 0 ].parentNode.nodeType===11)){ return; } for(i=0; i < set.length; i++){ if(instance.options[ set[ i ][ 0 ] ]){ set[ i ][ 1 ].apply(instance.element, args); }} }};})); (function(factory){ if(typeof define==="function"&&define.amd){ define('ui/position',[ "jquery", "./version" ], factory); }else{ factory(jQuery); }}(function($){ (function(){ var cachedScrollbarWidth, supportsOffsetFractions, max=Math.max, abs=Math.abs, round=Math.round, rhorizontal=/left|center|right/, rvertical=/top|center|bottom/, roffset=/[\+\-]\d+(\.[\d]+)?%?/, rposition=/^\w+/, rpercent=/%$/, _position=$.fn.position; supportsOffsetFractions=function(){ var element=$("