var mobilewidth = 1190; // 手机弹出导航菜单 $(function(){ if( $(window).width()=mobilewidth ){ fixedtop($('.mainnav'),$('.navbrace'),0); } }); function fixedtop(obj,brace,objtop){ if( objtop==0 ){ var height = obj.offset().top; }else{ var height = objtop; } $(window).resize(function(){ height = obj.offset().top; objfixed(obj,height,brace); }); $(window).scroll(function(){ objfixed(obj,height,brace); }); objfixed(obj,height,brace); } function objfixed(obj,height,brace){ if( $(document).scrolltop() >= height ){ brace.show(); obj.addclass("fixed"); }else{ brace.hide(); obj.removeclass("fixed"); } } // 导航下拉 $(function(){ if( $(window).width()>=mobilewidth ){ $(".mainnav>.wrap>li").hover( function(){ $(this).find(".sub").stop().slidedown(350); },function(){ $(this).find(".sub").stop().slideup(350); } ); } if( $(window).width()=mobilewidth ){ $('.header .language').hover(function(){ $(this).find('.list').stop().slidetoggle(150); $(this).find('.tit').toggleclass('on'); }); } if( $(window).width()=mobilewidth ){ $(".fixed-sidebar li").hover( function(){ $(this).find(".hide").stop().fadetoggle(200); } ); } if( $(window).width()0 ){ $(window).scroll(function(){ numberinit(); }); numberinit(); } var isfirst = true; function numberinit(){ var objtop = obj.offset().top; var objheight = obj.height(); var wintop = $(window).scrolltop(); var winheight = $(window).height() if( wintop+winheight-objheight>objtop && isfirst==true){ obj.each(function(){ $(this).numberrock(); }); isfirst = false; } } } $(function(){ $(".main .datashow .number span").each(function(){ numberrockinit( $(this) ); }); }); //tab切换 function tabswitch(tab,tabbox,tabli_name,click_method){ var li = tab.find(tabli_name); var on = li.index( tab.find(".on") ); tabbox.children("div").eq(on).show().siblings().hide(); if( click_method==0 ){ li.mouseenter(function(){ $(this).addclass("on").siblings().removeclass("on"); var index = li.index(this); tabbox.children("div").eq(index).show().siblings().hide(); }); }else{ li.click(function(){ $(this).addclass("on").siblings().removeclass("on"); var index = li.index(this); tabbox.children("div").eq(index).show().siblings().hide(); }); } } $(function(){ tabswitch( $(".about-page .introduction .tab") , $(".about-page .introduction .tabbox") , "li" , 0 ); tabswitch( $(".about-page .recruitment .tab") , $(".about-page .recruitment .tabbox") , "li" , 0 ); tabswitch( $(".case-page .tab") , $(".case-page .tabbox") , "span" , 0 ); tabswitch( $(".encapsulation .tab") , $(".encapsulation .tabbox") , "li" , 1 ); }); // 视频 $(function(){ if( $(window).width()>=mobilewidth ){ $('video').click(function() { if ($(this).hasclass('pause')) { $(this).trigger("play"); $(this).removeclass('pause'); $(this).addclass('play'); } else { $(this).trigger("pause"); $(this).removeclass('play'); $(this).addclass('pause'); } }); } }); function clickpicvideo(obj){ var video = obj.find('video'); var pic = obj.find('.pic'); pic.click(function(){ //点击图片播放视频 pic.hide(); video.show(); video.trigger('play'); }); // 播放结束 video.get(0).addeventlistener('ended', function () { //视频播放结束触发 video.hide(); pic.show(); // 判断是全屏的时候退出全屏 if(document.fullscreenelement || document.webkitfullscreenelement || document.mozfullscreenelement || document.msfullscreenelement){ if(document.cancelfullscreen){ document.cancelfullscreen(); } else if(document.webkitcancelfullscreen){ document.webkitcancelfullscreen(); } else if(document.mozcancelfullscreen){ document.mozcancelfullscreen(); } else if(document.mscancelfullscreen){ document.mscancelfullscreen(); } } }, false); } $(function(){ $('.videobox').each(function(){ clickpicvideo( $(this) ); }); }) // 弹出大图 $(function(){ $(".photoshow").each(function(index){ photoshow( $(this) ); }); function photoshow(classname){ layui.use('layer', function(){ var layer = layui.layer; layer.photos({ photos: classname, anim: 5, shade: [0.7, '#000'], closebtn:2, resize:false, move:false }); }); } }); // 招聘 $(function(){ $('.recruitment .list li .top').click(function(){ var cont = $(this).siblings('.cont'); var li = $(this).parent('li'); if( cont.is(':hidden') ){ cont.slidedown(150); li.addclass('on'); li.siblings('li').removeclass('on'); li.siblings('li').find('.cont').slideup(150); }else{ li.removeclass('on'); cont.slideup(150); } }); }); // 锚点 $(function(){ $('a[href*=#],area[href*=#]').click(function() { if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) { var $target = $(this.hash); $target = $target.length && $target || $('[name=' + this.hash.slice(1) + ']'); if ($target.length) { var targetoffset = $target.offset().top; $('html,body').animate({ scrolltop: targetoffset }, 600); return false; } } }); }) //收缩下拉 function shoushuo(tit,ul){ var memory; tit.click(function(event){ event.stoppropagation(); memory = $(window).scrolltop(); if(ul.is(':hidden')){ ul.slidedown(150); tit.addclass('on'); }else{ ul.slideup(150); tit.removeclass('on'); } }); // $(window).scroll(function(){ // if( $(window).scrolltop()>memory+100 || $(window).scrolltop() * @license mit * * @example *
 * socialshare('.share-components');
 *
 * // or
 *
 * socialshare('.share-bar', {
 *     sites: ['qzone', 'qq', 'weibo','wechat'],
 *     // ...
 * });
 * 
*/ ;(function(window,document,undefined){var array$indexof=array.prototype.indexof;var object$assign=object.assign;var runninginwechat=/micromessenger/i.test(navigator.useragent);var ismobilescreen=document.documentelement.clientwidth<=768;var image=(document.images[0]||0).src||'';var site=getmetacontentbyname('site')||getmetacontentbyname('site')||document.title;var title=getmetacontentbyname('title')||getmetacontentbyname('title')||document.title;var description=getmetacontentbyname('description')||getmetacontentbyname('description')||'';var defaults={url:location.href,origin:location.origin,source:site,title:title,description:description,image:image,imageselector:undefined,weibokey:'',wechatqrcodetitle:'微信扫一扫:分享',wechatqrcodehelper:'

微信里点“发现”,扫一下

二维码便可将本文分享至朋友圈。

',wechatqrcodesize:100,sites:['weibo','qq','wechat','douban','qzone','linkedin','facebook','twitter','google'],mobilesites:[],disabled:[],initialized:false};var templates={qzone:'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url={{url}}&title={{title}}&desc={{description}}&summary={{summary}}&site={{source}}',qq:'http://connect.qq.com/widget/shareqq/index.html?url={{url}}&title={{title}}&source={{source}}&desc={{description}}&pics={{image}}&summary="{{summary}}"',weibo:'https://service.weibo.com/share/share.php?url={{url}}&title={{title}}&pic={{image}}&appkey={{weibokey}}',wechat:'javascript:',douban:'http://shuo.douban.com/!service/share?href={{url}}&name={{title}}&text={{description}}&image={{image}}&starid=0&aid=0&style=11',linkedin:'http://www.linkedin.com/sharearticle?mini=true&ro=true&title={{title}}&url={{url}}&summary={{summary}}&source={{source}}&armin=armin',facebook:'https://www.facebook.com/sharer/sharer.php?u={{url}}',twitter:'https://twitter.com/intent/tweet?text={{title}}&url={{url}}&via={{origin}}',google:'https://plus.google.com/share?url={{url}}'};window.socialshare=function(elem,options){elem=typeof elem==='string'?queryselectoralls(elem):elem;if(elem.length===undefined){elem=[elem]}each(elem,function(el){if(!el.initialized){share(el,options)}})};already(function(){socialshare('.social-share, .share-component')});function share(elem,options){var data=mixin({},defaults,options||{},dataset(elem));if(data.imageselector){data.image=queryselectoralls(data.imageselector).map(function(item){return item.src}).join('||')}addclass(elem,'share-component social-share');createicons(elem,data);createwechat(elem,data);elem.initialized=true}function createicons(elem,data){var sites=getsites(data);var isprepend=data.mode=='prepend';each(isprepend?sites.reverse():sites,function(name){var url=makeurl(name,data);var link=data.initialized?getelementsbyclassname(elem,'icon-'+name):createelementbystring('');if(!link.length){return true}link[0].href=url;if(name==='wechat'){link[0].tabindex=-1}else{link[0].target='_blank'}if(!data.initialized){isprepend?elem.insertbefore(link[0],elem.firstchild):elem.appendchild(link[0])}})}function createwechat(elem,data){var wechat=getelementsbyclassname(elem,'icon-wechat','a');if(wechat.length===0){return false}var elems=createelementbystring('

'+data.wechatqrcodetitle+'

'+data.wechatqrcodehelper+'
');var qrcode=getelementsbyclassname(elems[0],'qrcode','div');new qrcode(qrcode[0],{text:data.url,width:data.wechatqrcodesize,height:data.wechatqrcodesize});wechat[0].appendchild(elems[0])}function getsites(data){if(!data['mobilesites'].length){data['mobilesites']=data['sites']}var sites=(ismobilescreen?data['mobilesites']:data['sites']).slice(0);var disabled=data['disabled'];if(typeof sites=='string'){sites=sites.split(/\s*,\s*/)}if(typeof disabled=='string'){disabled=disabled.split(/\s*,\s*/)}if(runninginwechat){disabled.push('wechat')}disabled.length&&each(disabled,function(it){sites.splice(inarray(it,sites),1)});return sites}function makeurl(name,data){if(!data['summary']){data['summary']=data['description']}return templates[name].replace(/\{\{(\w)(\w*)\}\}/g,function(m,fix,key){var namekey=name+fix+key.tolowercase();key=(fix+key).tolowercase();return encodeuricomponent((data[namekey]===undefined?data[key]:data[namekey])||'')})}function queryselectoralls(str){return(document.queryselectorall||window.jquery||window.zepto||selector).call(document,str)}function selector(str){var elems=[];each(str.split(/\s*,\s*/),function(s){var m=s.match(/([#.])(\w+)/);if(m===null){throw error('supports only simple single #id or .class selector.');}if(m[1]){var elem=document.getelementbyid(m[2]);if(elem){elems.push(elem)}}elems=elems.concat(getelementsbyclassname(str))});return elems}function addclass(elem,value){if(value&&typeof value==="string"){var classnames=(elem.classname+' '+value).split(/\s+/);var setclass=' ';each(classnames,function(classname){if(setclass.indexof(' '+classname+' ')<0){setclass+=classname+' '}});elem.classname=setclass.slice(1,-1)}}function getmetacontentbyname(name){return(document.getelementsbyname(name)[0]||0).content}function getelementsbyclassname(elem,name,tag){if(elem.getelementsbyclassname){return elem.getelementsbyclassname(name)}var elements=[];var elems=elem.getelementsbytagname(tag||'*');name=' '+name+' ';each(elems,function(elem){if((' '+(elem.classname||'')+' ').indexof(name)>=0){elements.push(elem)}});return elements}function createelementbystring(str){var div=document.createelement('div');div.innerhtml=str;return div.childnodes}function mixin(){var args=arguments;if(object$assign){return object$assign.apply(null,args)}var target={};each(args,function(it){each(it,function(v,k){target[k]=v})});return args[0]=target}function dataset(elem){if(elem.dataset){return json.parse(json.stringify(elem.dataset))}var target={};if(elem.hasattributes()){each(elem.attributes,function(attr){var name=attr.name;if(name.indexof('data-')!==0){return true}name=name.replace(/^data-/i,'').replace(/-(\w)/g,function(all,letter){return letter.touppercase()});target[name]=attr.value});return target}return{}}function inarray(elem,arr,i){var len;if(arr){if(array$indexof){return array$indexof.call(arr,elem,i)}len=arr.length;i=i?i<0?math.max(0,len+i):i:0;for(;ihttp://www.d-project.com/ * @see http://jeromeetienne.github.com/jquery-qrcode/ */ var qrcode;(function(){function qr8bitbyte(data){this.mode=qrmode.mode_8bit_byte;this.data=data;this.parseddata=[];for(var i=0,l=this.data.length;i0x10000){bytearray[0]=0xf0|((code&0x1c0000)>>>18);bytearray[1]=0x80|((code&0x3f000)>>>12);bytearray[2]=0x80|((code&0xfc0)>>>6);bytearray[3]=0x80|(code&0x3f)}else if(code>0x800){bytearray[0]=0xe0|((code&0xf000)>>>12);bytearray[1]=0x80|((code&0xfc0)>>>6);bytearray[2]=0x80|(code&0x3f)}else if(code>0x80){bytearray[0]=0xc0|((code&0x7c0)>>>6);bytearray[1]=0x80|(code&0x3f)}else{bytearray[0]=code}this.parseddata.push(bytearray)}this.parseddata=array.prototype.concat.apply([],this.parseddata);if(this.parseddata.length!=this.data.length){this.parseddata.unshift(191);this.parseddata.unshift(187);this.parseddata.unshift(239)}}qr8bitbyte.prototype={getlength:function(buffer){return this.parseddata.length},write:function(buffer){for(var i=0,l=this.parseddata.length;i=7){this.setuptypenumber(test)}if(this.datacache==null){this.datacache=qrcodemodel.createdata(this.typenumber,this.errorcorrectlevel,this.datalist)}this.mapdata(this.datacache,maskpattern)},setuppositionprobepattern:function(row,col){for(var r=-1;r<=7;r++){if(row+r<=-1||this.modulecount<=row+r)continue;for(var c=-1;c<=7;c++){if(col+c<=-1||this.modulecount<=col+c)continue;if((0<=r&&r<=6&&(c==0||c==6))||(0<=c&&c<=6&&(r==0||r==6))||(2<=r&&r<=4&&2<=c&&c<=4)){this.modules[row+r][col+c]=true}else{this.modules[row+r][col+c]=false}}}},getbestmaskpattern:function(){var minlostpoint=0;var pattern=0;for(var i=0;i<8;i++){this.makeimpl(true,i);var lostpoint=qrutil.getlostpoint(this);if(i==0||minlostpoint>lostpoint){minlostpoint=lostpoint;pattern=i}}return pattern},createmovieclip:function(target_mc,instance_name,depth){var qr_mc=target_mc.createemptymovieclip(instance_name,depth);var cs=1;this.make();for(var row=0;row>i)&1)==1);this.modules[math.floor(i/3)][i%3+this.modulecount-8-3]=mod}for(var i=0;i<18;i++){var mod=(!test&&((bits>>i)&1)==1);this.modules[i%3+this.modulecount-8-3][math.floor(i/3)]=mod}},setuptypeinfo:function(test,maskpattern){var data=(this.errorcorrectlevel<<3)|maskpattern;var bits=qrutil.getbchtypeinfo(data);for(var i=0;i<15;i++){var mod=(!test&&((bits>>i)&1)==1);if(i<6){this.modules[i][8]=mod}else if(i<8){this.modules[i+1][8]=mod}else{this.modules[this.modulecount-15+i][8]=mod}}for(var i=0;i<15;i++){var mod=(!test&&((bits>>i)&1)==1);if(i<8){this.modules[8][this.modulecount-i-1]=mod}else if(i<9){this.modules[8][15-i-1+1]=mod}else{this.modules[8][15-i-1]=mod}}this.modules[this.modulecount-8][8]=(!test)},mapdata:function(data,maskpattern){var inc=-1;var row=this.modulecount-1;var bitindex=7;var byteindex=0;for(var col=this.modulecount-1;col>0;col-=2){if(col==6)col--;while(true){for(var c=0;c<2;c++){if(this.modules[row][col-c]==null){var dark=false;if(byteindex>>bitindex)&1)==1)}var mask=qrutil.getmask(maskpattern,row,col-c);if(mask){dark=!dark}this.modules[row][col-c]=dark;bitindex--;if(bitindex==-1){byteindex++;bitindex=7}}}row+=inc;if(row<0||this.modulecount<=row){row-=inc;inc=-inc;break}}}}};qrcodemodel.pad0=0xec;qrcodemodel.pad1=0x11;qrcodemodel.createdata=function(typenumber,errorcorrectlevel,datalist){var rsblocks=qrrsblock.getrsblocks(typenumber,errorcorrectlevel);var buffer=new qrbitbuffer();for(var i=0;itotaldatacount*8){throw new error("code length overflow. ("+buffer.getlengthinbits()+">"+totaldatacount*8+")");}if(buffer.getlengthinbits()+4<=totaldatacount*8){buffer.put(0,4)}while(buffer.getlengthinbits()%8!=0){buffer.putbit(false)}while(true){if(buffer.getlengthinbits()>=totaldatacount*8){break}buffer.put(qrcodemodel.pad0,8);if(buffer.getlengthinbits()>=totaldatacount*8){break}buffer.put(qrcodemodel.pad1,8)}return qrcodemodel.createbytes(buffer,rsblocks)};qrcodemodel.createbytes=function(buffer,rsblocks){var offset=0;var maxdccount=0;var maxeccount=0;var dcdata=new array(rsblocks.length);var ecdata=new array(rsblocks.length);for(var r=0;r=0)?modpoly.get(modindex):0}}var totalcodecount=0;for(var i=0;i=0){d^=(qrutil.g15<<(qrutil.getbchdigit(d)-qrutil.getbchdigit(qrutil.g15)))}return((data<<10)|d)^qrutil.g15_mask},getbchtypenumber:function(data){var d=data<<12;while(qrutil.getbchdigit(d)-qrutil.getbchdigit(qrutil.g18)>=0){d^=(qrutil.g18<<(qrutil.getbchdigit(d)-qrutil.getbchdigit(qrutil.g18)))}return(data<<12)|d},getbchdigit:function(data){var digit=0;while(data!=0){digit++;data>>>=1}return digit},getpatternposition:function(typenumber){return qrutil.pattern_position_table[typenumber-1]},getmask:function(maskpattern,i,j){switch(maskpattern){case qrmaskpattern.pattern000:return(i+j)%2==0;case qrmaskpattern.pattern001:return i%2==0;case qrmaskpattern.pattern010:return j%3==0;case qrmaskpattern.pattern011:return(i+j)%3==0;case qrmaskpattern.pattern100:return(math.floor(i/2)+math.floor(j/3))%2==0;case qrmaskpattern.pattern101:return(i*j)%2+(i*j)%3==0;case qrmaskpattern.pattern110:return((i*j)%2+(i*j)%3)%2==0;case qrmaskpattern.pattern111:return((i*j)%3+(i+j)%2)%2==0;default:throw new error("bad maskpattern:"+maskpattern);}},geterrorcorrectpolynomial:function(errorcorrectlength){var a=new qrpolynomial([1],0);for(var i=0;i5){lostpoint+=(3+samecount-5)}}}for(var row=0;row=256){n-=255}return qrmath.exp_table[n]},exp_table:new array(256),log_table:new array(256)};for(var i=0;i<8;i++){qrmath.exp_table[i]=1<>>(7-index%8))&1)==1},put:function(num,length){for(var i=0;i>>(length-i-1))&1)==1)}},getlengthinbits:function(){return this.length},putbit:function(bit){var bufindex=math.floor(this.length/8);if(this.buffer.length<=bufindex){this.buffer.push(0)}if(bit){this.buffer[bufindex]|=(0x80>>>(this.length%8))}this.length++}};var qrcodelimitlength=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function _issupportcanvas(){return typeof canvasrenderingcontext2d!="undefined"}function _getandroid(){var android=false;var sagent=navigator.useragent;if(/android/i.test(sagent)){android=true;var amat=sagent.tostring().match(/android ([0-9]\.[0-9])/i);if(amat&&amat[1]){android=parsefloat(amat[1])}}return android}var svgdrawer=(function(){var drawing=function(el,htoption){this._el=el;this._htoption=htoption};drawing.prototype.draw=function(oqrcode){var _htoption=this._htoption;var _el=this._el;var ncount=oqrcode.getmodulecount();var nwidth=math.floor(_htoption.width/ncount);var nheight=math.floor(_htoption.height/ncount);this.clear();function makesvg(tag,attrs){var el=document.createelementns('http://www.w3.org/2000/svg',tag);for(var k in attrs)if(attrs.hasownproperty(k))el.setattribute(k,attrs[k]);return el}var svg=makesvg("svg",{'viewbox':'0 0 '+string(ncount)+" "+string(ncount),'width':'100%','height':'100%','fill':_htoption.colorlight});svg.setattributens("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink");_el.appendchild(svg);svg.appendchild(makesvg("rect",{"fill":_htoption.colorlight,"width":"100%","height":"100%"}));svg.appendchild(makesvg("rect",{"fill":_htoption.colordark,"width":"1","height":"1","id":"template"}));for(var row=0;row'];for(var row=0;row');for(var col=0;col')}ahtml.push('')}ahtml.push('');_el.innerhtml=ahtml.join('');var eltable=_el.childnodes[0];var nleftmargintable=(_htoption.width-eltable.offsetwidth)/2;var ntopmargintable=(_htoption.height-eltable.offsetheight)/2;if(nleftmargintable>0&&ntopmargintable>0){eltable.style.margin=ntopmargintable+"px "+nleftmargintable+"px"}};drawing.prototype.clear=function(){this._el.innerhtml=''};return drawing})():(function(){function _onmakeimage(){this._elimage.src=this._elcanvas.todataurl("image/png");this._elimage.style.display="block";this._elcanvas.style.display="none"}if(this._android&&this._android<=2.1){var factor=1/window.devicepixelratio;var drawimage=canvasrenderingcontext2d.prototype.drawimage;canvasrenderingcontext2d.prototype.drawimage=function(image,sx,sy,sw,sh,dx,dy,dw,dh){if(("nodename"in image)&&/img/i.test(image.nodename)){for(var i=arguments.length-1;i>=1;i--){arguments[i]=arguments[i]*factor}}else if(typeof dw=="undefined"){arguments[1]*=factor;arguments[2]*=factor;arguments[3]*=factor;arguments[4]*=factor}drawimage.apply(this,arguments)}}function _safesetdatauri(fsuccess,ffail){var self=this;self._ffail=ffail;self._fsuccess=fsuccess;if(self._bsupportdatauri===null){var el=document.createelement("img");var fonerror=function(){self._bsupportdatauri=false;if(self._ffail){self._ffail.call(self)}};var fonsuccess=function(){self._bsupportdatauri=true;if(self._fsuccess){self._fsuccess.call(self)}};el.onabort=fonerror;el.onerror=fonerror;el.onload=fonsuccess;el.src="data:image/gif;base64,ivborw0kggoaaaansuheugaaaauaaaafcayaaacnbyblaaaaheleqvqi12p4//8/w38giaxdibke0dhxgljnbaao9txl0y4ohwaaaabjru5erkjggg==";return}else if(self._bsupportdatauri===true&&self._fsuccess){self._fsuccess.call(self)}else if(self._bsupportdatauri===false&&self._ffail){self._ffail.call(self)}};var drawing=function(el,htoption){this._bispainted=false;this._android=_getandroid();this._htoption=htoption;this._elcanvas=document.createelement("canvas");this._elcanvas.width=htoption.width;this._elcanvas.height=htoption.height;el.appendchild(this._elcanvas);this._el=el;this._ocontext=this._elcanvas.getcontext("2d");this._bispainted=false;this._elimage=document.createelement("img");this._elimage.alt="scan me!";this._elimage.style.display="none";this._el.appendchild(this._elimage);this._bsupportdatauri=null};drawing.prototype.draw=function(oqrcode){var _elimage=this._elimage;var _ocontext=this._ocontext;var _htoption=this._htoption;var ncount=oqrcode.getmodulecount();var nwidth=_htoption.width/ncount;var nheight=_htoption.height/ncount;var nroundedwidth=math.round(nwidth);var nroundedheight=math.round(nheight);_elimage.style.display="none";this.clear();for(var row=0;rowqrcodelimitlength.length){throw new error("too long data");}return ntype}function _getutf8length(stext){var replacedtext=encodeuri(stext).tostring().replace(/\%[0-9a-fa-f]{2}/g,'a');return replacedtext.length+(replacedtext.length!=stext?3:0)}qrcode=function(el,voption){this._htoption={width:256,height:256,typenumber:4,colordark:"#000000",colorlight:"#ffffff",correctlevel:qrerrorcorrectlevel.h};if(typeof voption==='string'){voption={text:voption}}if(voption){for(var i in voption){this._htoption[i]=voption[i]}}if(typeof el=="string"){el=document.getelementbyid(el)}if(this._htoption.usesvg){drawing=svgdrawer}this._android=_getandroid();this._el=el;this._oqrcode=null;this._odrawing=new drawing(this._el,this._htoption);if(this._htoption.text){this.makecode(this._htoption.text)}};qrcode.prototype.makecode=function(stext){this._oqrcode=new qrcodemodel(_gettypenumber(stext,this._htoption.correctlevel),this._htoption.correctlevel);this._oqrcode.adddata(stext);this._oqrcode.make();this._el.title=stext;this._odrawing.draw(this._oqrcode);this.makeimage()};qrcode.prototype.makeimage=function(){if(typeof this._odrawing.makeimage=="function"&&(!this._android||this._android>=3)){this._odrawing.makeimage()}};qrcode.prototype.clear=function(){this._odrawing.clear()};qrcode.correctlevel=qrerrorcorrectlevel})();if(typeof module!="undefined"){module.exports=qrcode}