/*jquery-parallax*/ /*scroll 用到*/ if(typeof jquery.easing["jswing"]=="undefined"){jquery.easing["jswing"]=jquery.easing["swing"];jquery.extend(jquery.easing,{def:"easeoutquad",swing:function(e,t,n,r,i){return jquery.easing[jquery.easing.def](e,t,n,r,i)},easeinquad:function(e,t,n,r,i){return r*(t/=i)*t+n},easeoutquad:function(e,t,n,r,i){return-r*(t/=i)*(t-2)+n},easeinoutquad:function(e,t,n,r,i){if((t/=i/2)<1)return r/2*t*t+n;return-r/2*(--t*(t-2)-1)+n},easeincubic:function(e,t,n,r,i){return r*(t/=i)*t*t+n},easeoutcubic:function(e,t,n,r,i){return r*((t=t/i-1)*t*t+1)+n},easeinoutcubic:function(e,t,n,r,i){if((t/=i/2)<1)return r/2*t*t*t+n;return r/2*((t-=2)*t*t+2)+n},easeinquart:function(e,t,n,r,i){return r*(t/=i)*t*t*t+n},easeoutquart:function(e,t,n,r,i){return-r*((t=t/i-1)*t*t*t-1)+n},easeinoutquart:function(e,t,n,r,i){if((t/=i/2)<1)return r/2*t*t*t*t+n;return-r/2*((t-=2)*t*t*t-2)+n},easeinquint:function(e,t,n,r,i){return r*(t/=i)*t*t*t*t+n},easeoutquint:function(e,t,n,r,i){return r*((t=t/i-1)*t*t*t*t+1)+n},easeinoutquint:function(e,t,n,r,i){if((t/=i/2)<1)return r/2*t*t*t*t*t+n;return r/2*((t-=2)*t*t*t*t+2)+n},easeinsine:function(e,t,n,r,i){return-r*math.cos(t/i*(math.pi/2))+r+n},easeoutsine:function(e,t,n,r,i){return r*math.sin(t/i*(math.pi/2))+n},easeinoutsine:function(e,t,n,r,i){return-r/2*(math.cos(math.pi*t/i)-1)+n},easeinexpo:function(e,t,n,r,i){return t==0?n:r*math.pow(2,10*(t/i-1))+n},easeoutexpo:function(e,t,n,r,i){return t==i?n+r:r*(-math.pow(2,-10*t/i)+1)+n},easeinoutexpo:function(e,t,n,r,i){if(t==0)return n;if(t==i)return n+r;if((t/=i/2)<1)return r/2*math.pow(2,10*(t-1))+n;return r/2*(-math.pow(2,-10*--t)+2)+n},easeincirc:function(e,t,n,r,i){return-r*(math.sqrt(1-(t/=i)*t)-1)+n},easeoutcirc:function(e,t,n,r,i){return r*math.sqrt(1-(t=t/i-1)*t)+n},easeinoutcirc:function(e,t,n,r,i){if((t/=i/2)<1)return-r/2*(math.sqrt(1-t*t)-1)+n;return r/2*(math.sqrt(1-(t-=2)*t)+1)+n},easeinelastic:function(e,t,n,r,i){var s=1.70158;var o=0;var u=r;if(t==0)return n;if((t/=i)==1)return n+r;if(!o)o=i*.3;if(u"; this.closecap = ' '+this.$el.find( '.menu-close' ).html()+""; /* !changed: end */ if($("body").hasclass("mobilefloatmenu") && this.$trigger.closest(".floatmenu,.fullfloatmenu").length>0 && this.$trigger.closest(".qfy-listcatecontrols").length==0){ this.$menu = jquery( '.floatwarpper ul.dl-menu' ); }else{ this.$menu = this.$el.find( 'ul.dl-menu' ); } this.$menuitems = this.$menu.find( 'li:not(.dl-back)' ); this.$back = this.$menu.find( 'li.dl-back' ); this.$menuitems.each(function(){ var $item_new = $(this), $submenu_new = $item_new.children( 'ul.dl-submenu' ); $item_new.siblings(".new-column").find("> a").remove(); var new_col_sub = $item_new.siblings(".new-column").find("> ul.dl-submenu").unwrap(); new_col_sub.find("> a, > .dl-back").remove(); new_col_sub.children().unwrap().appendto($submenu_new); $item_new.siblings(".new-column").remove(); if( $item_new.find("> a").attr("href")=="#"){ $item_new.find("> a").removeattr("href"); } }); }, _initevents : function() { var self = this; self.not_close_menu = false; if(self.$trigger.parent().hasclass("notcloseparent")) { self.not_close_menu = true; self.$trigger.parent().find(".menu-item.dl-back").remove(); } this.$trigger.unbind().on( 'click.dlmenu', function(event) { if( self.open ) { if(self.not_close_menu){ if($(event.currenttarget).hasclass("dropcenterstyle")){ self._closemenu(); } }else{ self._closemenu(); } } else { self._openmenu(); // clicking somewhere else makes the menu close if(self.$trigger.hasclass("leftbtnmenu")) { if (jquery("body >.dl-menu-film").length == 0) { jquery("body").prepend("
"); } jquery("body >.dl-menu-film").off('click').on('click.dlmenu', function () { self._closemenu(); }); }else if(self.not_close_menu) { //... }else{ $body.off( 'click' ).on( 'click.dlmenu', function() { self._closemenu() ; } ); } } return false; } ); this.$menuitems.on( 'click.dlmenu', function( event ) { if($(this).closest(".dl-menuwrapper").css("visibility")=="hidden"){ return; } event.stoppropagation(); var $item = $(this),$submenu = $item.children( 'ul.dl-submenu' ); if( $submenu.length > 0 ) { var xx=event.pagex; var width = $submenu.width(); var isclick = width-xx>35; if($item.closest("#dl-menu").find(">#mobile-menu").hasclass("firstopensub") || jquery("#dl-menu >#mobile-menu").hasclass("firstopensub")){ var textw = $item.find(">a>span").width()*1+$item.find(">a>span").offset().left*1; isclick = xxa").attr("href")){ //无链接 isclick = false; } if(isclick){ if($item.find("a").attr("href") && $item.find("a").attr("href").indexof("#")>-1){ //self._closemenu(); } }else{ //... if( $(this).closest(".dl-menuwrapper").hasclass("leftbtnmenu") || self.not_close_menu){ if($submenu.css("display")!="block"){ var h = $submenu.height(); $submenu.show().css("height",0).animate({ height: h }, 150,function(){ $submenu.attr("style","display:block;"); }); $item.addclass( 'dl-subviewopen' ); }else{ $submenu.animate({ height: 0 }, 150,function(){ $submenu.hide(); }); $item.removeclass( 'dl-subviewopen' ) } }else{ $("html, body").animate({ scrolltop: self.$el.offset().top - 20 }, 150); var $flyin = $submenu.clone().insertafter( self.$menu ).addclass( self.options.animationclasses.animin ), onanimationendfn = function() { self.$menu.off( self.animendeventname ).removeclass( self.options.animationclasses.animout ).addclass( 'dl-subview' ); $item.addclass( 'dl-subviewopen' ).parents( '.dl-subviewopen:first' ).removeclass( 'dl-subviewopen' ).addclass( 'dl-subview' ); $item.addclass( 'qfy-subviewopen' ); $flyin.remove(); }; self.$menu.addclass( self.options.animationclasses.animout ); if( self.supportanimations ) { self.$menu.on( self.animendeventname, onanimationendfn ); } else { onanimationendfn.call(); } } return false; } }else{ if($item.find("a").attr("href") && $item.find("a").attr("href").indexof("#")>-1 && !self.not_close_menu){ self._closemenu(); } } } ); this.$back.on( 'click.dlmenu', function( event ) { $("html, body").animate({ scrolltop: self.$el.offset().top - 20 }, 150); var $this = $( this ), $submenu = $this.parents( 'ul.dl-submenu:first' ), $item = $submenu.parent(), $flyin = $submenu.clone().insertafter( self.$menu ).addclass( self.options.animationclasses.animout ); var onanimationendfn = function() { self.$menu.off( self.animendeventname ).removeclass( self.options.animationclasses.animin ); $flyin.remove(); }; self.$menu.addclass( self.options.animationclasses.animin ); if( self.supportanimations ) { self.$menu.on( self.animendeventname, onanimationendfn ); } else { onanimationendfn.call(); } $item.removeclass( 'dl-subviewopen' ).removeclass("qfy-subviewopen"); var $subview = $this.parents( '.dl-subview:first' ); if( $subview.is( 'li' ) ) { $subview.addclass( 'dl-subviewopen' ).addclass("qfy-subviewopen"); } $subview.removeclass( 'dl-subview' ); return false; } ); }, _closemenu : function() { var self = this, ontransitionendfn = function() { self.$menu.off( self.transendeventname ); self._resetmenu(); }; this.$menu.removeclass( 'dl-menuopen' ); this.$menu.parent().removeclass("dl-menuopen-parent"); if($("body").hasclass("mobilefloatmenu") && this.$trigger.closest(".floatmenu,.fullfloatmenu").length>0 && this.$trigger.closest(".qfy-listcatecontrols").length==0){ $(".mobilefloatmenu.dl-menu-open #page").removeattr("style"); $(".dl-menu-open .floatwarpper").removeattr("style"); $(".floatwarpper .dl-container").removeattr("style"); $("#page #dl-menu").removeattr("style"); $("body > #dl-menu").remove(); var element_right = $("#mobile-menu").attr("data-right"); if(element_right){ $("#dl-menu").css("right",element_right+"px"); } var element_top = $("#mobile-menu").attr("data-top"); if(element_top){ $("#dl-menu").css("top",element_top+"px"); } } $("body").removeclass("dl-menu-open"); this.$menu.addclass( 'dl-menu-toggle' ); if(this.$menu.closest("section.section").length>0){ var style = this.$menu.closest("section.section").attr("style"); style = style.replace(/min-height:\s*\d+px;*/g,""); this.$menu.closest("section.section").attr("style",style); } this.$trigger.removeclass( 'dl-active' ).html(this.opencap); if( this.supporttransitions ) { this.$menu.on( this.transendeventname, ontransitionendfn ); } else { ontransitionendfn.call(); } this.open = false; /* this.$el.css({ position : "fixed", top : "" }); */ }, _openmenu : function() { this.$menu.parent().addclass("dl-menuopen-parent"); this.$menu.addclass( 'dl-menuopen dl-menu-toggle' ).on( this.transendeventname, function() { $( this ).removeclass( 'dl-menu-toggle' ); } ); if($("body").hasclass("mobilefloatmenu") && this.$trigger.closest(".floatmenu,.fullfloatmenu").length>0 && this.$menu.closest(".qfy-listcatecontrols").length==0){ var $this = this; $("body").addclass("dl-menu-open"); var width = $('html').width(); if($("#mobile-menu").hasclass("fullfloatmenu")){ var w= width; }else{ var w = width - 60; } if(!$(".floatwarpper").hasclass("leftbtnmenu")){ $(".mobilefloatmenu.dl-menu-open #page").css('transform','translate3d(-'+w+'px, 0px, 0px)').css('-webkit-transform','translate3d(-'+w+'px,0,0)'); $(".dl-menu-open .floatwarpper").css('transform','translate3d(-'+w+'px, 0px, 0px)').css('-webkit-transform','translate3d(-'+w+'px,0,0)'); $(".floatwarpper").width(w).css("right","-"+w+"px"); } $(".floatwarpper .dl-container").css("max-width","100%"); var element_top = $("#mobile-menu").attr("data-top"); var element_right = $("#mobile-menu").attr("data-right"); if(element_top){ $("#page #dl-menu").css("top",element_top+"px"); $("body > #dl-menu").css("top",element_top+"px"); } settimeout(function(){ if(!$(".floatwarpper").hasclass("leftbtnmenu")){ $("#page #dl-menu").removeclass("dl-menu-hidden"); var menu_html =$("#page #dl-menu").prop("outerhtml"); $("body").prepend(menu_html); if(element_top){ $("body > #dl-menu").css("top",element_top+"px"); } $("#page #dl-menu").addclass("dl-menu-hidden"); if($("#mobile-menu").hasclass("fullfloatmenu")){ $("body > #dl-menu").css("right",element_right+"px"); }else{ $("body > #dl-menu").css("right",(1*w+8)+"px"); } } $("body > #dl-menu").unbind().bind("click",function(e){ e.stoppropagation(); $this.$trigger.click(); return false; }); },200) } this.$trigger.addclass( 'dl-active' ).html(this.closecap); this.open = true; if(this.$menu.closest("section.section").length>0){ var minheight = this.$menu.height(); this.$menu.closest("section.section").css("min-height",minheight+"px"); } if(!$(".floatwarpper").hasclass("leftbtnmenu")){ $("html, body").animate({ scrolltop: this.$el.offset().top - 20 }, 150); } }, // resets the menu to its original state (first level of options) _resetmenu : function() { if(!this.$menu.closest(".dl-menuwrapper").hasclass("leftbtnmenu") && !this.not_close_menu){ this.$menu.removeclass( 'dl-subview' ); this.$menuitems.removeclass( 'dl-subview dl-subviewopen' ); } } }; var logerror = function( message ) { if ( window.console ) { window.console.error( message ); } }; $.fn.dlmenu = function( options ) { if ( typeof options === 'string' ) { var args = array.prototype.slice.call( arguments, 1 ); this.each(function() { var instance = $.data( this, 'dlmenu' ); if ( !instance ) { logerror( "cannot call methods on dlmenu prior to initialization; " + "attempted to call method '" + options + "'" ); return; } if ( !$.isfunction( instance[options] ) || options.charat(0) === "_" ) { logerror( "no such method '" + options + "' for dlmenu instance" ); return; } instance[ options ].apply( instance, args ); }); } else { this.each(function() { var instance = $.data( this, 'dlmenu' ); if ( instance ) { instance._init(); } else { instance = $.data( this, 'dlmenu', new $.dlmenu( options, this ) ); } }); } return this; }; } )( jquery, window ); /****************************************************************************************************************************/ /* !- tooltip*/ function simple_tooltip(e,t){jquery(e).each(function(e){jquery("body").append("
"+jquery(this).find("span.tooltip-c").html()+"
");var n=jquery("#"+t+e);jquery(this).removeattr("title").mouseover(function(){n.css({opacity:1,display:"none"}).fadein(400)}).mousemove(function(e){var t=jquery(window).scrolltop();var r=jquery(window).width();var i;var s;var o=15;if(r-o*2>=n.width()+e.pagex){i=e.pagex+o}else{i=r-n.width()-o}if(t+o*2>=e.pagey-n.height()){s=t+o}else{s=e.pagey-n.height()-2.2*o}n.css({left:i,top:s})}).mouseout(function(){n.css({left:"-9999px"})})})} /* !sandbox */ /*! * jquery.customselect() - v0.4.1 * http://adam.co/lab/jquery/customselect/ * 2013-05-13 * * copyright 2013 adam coulombe * @license http://www.opensource.org/licenses/mit-license.html mit license * @license http://www.gnu.org/licenses/gpl.html gpl2 license */ jquery(document).ready(function(a) {a.fn.extend({customselect:function(c){if(typeof document.body.style.maxheight==="undefined"){return this}var e={customclass:"customselect",mapclass:true,mapstyle:true},c=a.extend(e,c),d=c.customclass,f=function(h,k){var g=h.find(":selected"),j=k.children(":first"),i=g.html()||" ";j.html(i);if(g.attr("disabled")){k.addclass(b("disabledoption"))}else{k.removeclass(b("disabledoption"))}settimeout(function(){k.removeclass(b("open"));a(document).off("mouseup."+b("open"))},60)},b=function(g){return d+g};return this.each(function(){var g=a(this),i=a("").addclass(b("inner")),h=a("");g.after(h.append(i));h.addclass(d);if(c.mapclass){h.addclass(g.attr("class"))}if(c.mapstyle){h.attr("style",g.attr("style"))}g.addclass("hascustomselect").on("update",function(){f(g,h);var k=parseint(g.outerwidth(),10)-(parseint(h.outerwidth(),10)-parseint(h.width(),10));h.css({display:"inline-block"});var j=h.outerheight();if(g.attr("disabled")){h.addclass(b("disabled"))}else{h.removeclass(b("disabled"))}i.css({width:k,display:"inline-block"});g.css({"-webkit-appearance":"menulist-button",width:h.outerwidth(),position:"absolute",opacity:0,height:j,fontsize:h.css("font-size")})}).on("change",function(){h.addclass(b("changed"));f(g,h)}).on("keyup",function(j){if(!h.hasclass(b("open"))){g.blur();g.focus()}else{if(j.which==13||j.which==27){f(g,h)}}}).on("mousedown",function(j){h.removeclass(b("changed"))}).on("mouseup",function(j){if(!h.hasclass(b("open"))){if(a("."+b("open")).not(h).length>0&&typeof installtrigger!=="undefined"){g.focus()}else{h.addclass(b("open"));j.stoppropagation();a(document).one("mouseup."+b("open"),function(k){if(k.target!=g.get(0)&&a.inarray(k.target,g.find("*").get())<0){g.blur()}else{f(g,h)}})}}}).focus(function(){h.removeclass(b("changed")).addclass(b("focus"))}).blur(function(){h.removeclass(b("focus")+" "+b("open"))}).hover(function(){h.addclass(b("hover"))},function(){h.removeclass(b("hover"))}).trigger("update")})}})}); /** * jquery.hoverdir.js v1.1.0 * http://www.codrops.com * * licensed under the mit license. * http://www.opensource.org/licenses/mit-license.php * * copyright 2012, codrops * http://www.codrops.com */ ;( function( $, window, undefined ) { 'use strict'; $.hoverdir = function( options, element ) { this.$el = $( element ); this._init( options ); }; // the options $.hoverdir.defaults = { speed : 300, easing : 'ease', hoverdelay : 0, inverse : false }; $.hoverdir.prototype = { _init : function( options ) { // options this.options = $.extend( true, {}, $.hoverdir.defaults, options ); // transition properties this.transitionprop = 'all ' + this.options.speed + 'ms ' + this.options.easing; // support for css transitions this.support = modernizr.csstransitions; // load the events this._loadevents(); }, _loadevents : function() { var self = this; this.$el.on( 'mouseenter.hoverdir, mouseleave.hoverdir', function( event ) { var $el = $( this ), $hoverelem = $el.find( 'div.rollover-content, div.fs-entry-content' ), direction = self._getdir( $el, { x : event.pagex, y : event.pagey } ), stylecss = self._getstyle( direction ); if( event.type === 'mouseenter' ) { $hoverelem.hide().css( stylecss.from ); cleartimeout( self.tmhover ); self.tmhover = settimeout( function() { $hoverelem.show( 0, function() { var $el = $( this ); if( self.support ) { $el.css( 'transition', self.transitionprop ); } self._applyanimation( $el, stylecss.to, self.options.speed ); } ); }, self.options.hoverdelay ); } else { if( self.support ) { $hoverelem.css( 'transition', self.transitionprop ); } cleartimeout( self.tmhover ); self._applyanimation( $hoverelem, stylecss.from, self.options.speed ); } } ); }, // credits : http://stackoverflow.com/a/3647634 _getdir : function( $el, coordinates ) { // the width and height of the current div var w = $el.width(), h = $el.height(), // calculate the x and y to get an angle to the center of the div from that x and y. // gets the x value relative to the center of the div and "normalize" it x = ( coordinates.x - $el.offset().left - ( w/2 )) * ( w > h ? ( h/w ) : 1 ), y = ( coordinates.y - $el.offset().top - ( h/2 )) * ( h > w ? ( w/h ) : 1 ), // the angle and the direction from where the mouse came in/went out clockwise (trbl=0123); // first calculate the angle of the point, // add 180 deg to get rid of the negative values // divide by 90 to get the quadrant // add 3 and do a modulo by 4 to shift the quadrants to a proper clockwise trbl (top/right/bottom/left) **/ direction = math.round( ( ( ( math.atan2(y, x) * (180 / math.pi) ) + 180 ) / 90 ) + 3 ) % 4; return direction; }, _getstyle : function( direction ) { var fromstyle, tostyle, slidefromtop = { left : '0px', top : '-100%' }, slidefrombottom = { left : '0px', top : '100%' }, slidefromleft = { left : '-100%', top : '0px' }, slidefromright = { left : '100%', top : '0px' }, slidetop = { top : '0px' }, slideleft = { left : '0px' }; switch( direction ) { case 0: // from top fromstyle = !this.options.inverse ? slidefromtop : slidefrombottom; tostyle = slidetop; break; case 1: // from right fromstyle = !this.options.inverse ? slidefromright : slidefromleft; tostyle = slideleft; break; case 2: // from bottom fromstyle = !this.options.inverse ? slidefrombottom : slidefromtop; tostyle = slidetop; break; case 3: // from left fromstyle = !this.options.inverse ? slidefromleft : slidefromright; tostyle = slideleft; break; }; return { from : fromstyle, to : tostyle }; }, // apply a transition or fallback to jquery animate based on modernizr.csstransitions support _applyanimation : function( el, stylecss, speed ) { $.fn.applystyle = this.support ? $.fn.css : $.fn.animate; el.stop().applystyle( stylecss, $.extend( true, [], { duration : speed + 'ms' } ) ); }, }; var logerror = function( message ) { if ( window.console ) { window.console.error( message ); } }; $.fn.hoverdir = function( options ) { var instance = $.data( this, 'hoverdir' ); if ( typeof options === 'string' ) { var args = array.prototype.slice.call( arguments, 1 ); this.each(function() { if ( !instance ) { logerror( "cannot call methods on hoverdir prior to initialization; " + "attempted to call method '" + options + "'" ); return; } if ( !$.isfunction( instance[options] ) || options.charat(0) === "_" ) { logerror( "no such method '" + options + "' for hoverdir instance" ); return; } instance[ options ].apply( instance, args ); }); } else { this.each(function() { if ( instance ) { instance._init(); } else { instance = $.data( this, 'hoverdir', new $.hoverdir( options, this ) ); } }); } return instance; }; } )( jquery, window ); /** * cookie plugin * * copyright (c) 2006 klaus hartl (stilbuero.de) * dual licensed under the mit and gpl licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ jquery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options=$.extend({},options);options.expires=-1;}var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toutcstring)){var date;if(typeof options.expires=='number'){date=new date();date.settime(date.gettime()+(options.expires*24*60*60*1000));}else{date=options.expires;}expires='; expires='+date.toutcstring();}var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeuricomponent(value),expires,path,domain,secure].join('');}else{var cookievalue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i