/*======================================================================*\ || #################################################################### || || # AT Movie 1.0 # || || # ---------------------------------------------------------------- # || || # Copyright © 2008-2009 AnhTrang.Org . All Rights Reserved. # || || # This file may not be redistributed in whole or significant part. # || || # ----------- AT MOVIE IS FREE SOFTWARE - OPEN SOURCE ------------ # || || # http://www.anhtrang.org | http://www.anhtrang.org/support.html # || || #################################################################### || \*======================================================================*/ // Change these two lines to modify your PLAY and STOP buttons. var mp3PlayButton = "http://www.jpgsvr.com/mp3/play2.gif"; var mp3StopButton = "http://www.jpgsvr.com/mp3/stop2.gif"; // Change these two lines to modify the "playing..." font and size. var mp3PlayingFont = "Verdana"; var mp3PlayingSize = "8pt"; //var mp3PlayButton = "http://www.jpgsvr.com/mp3/play.png"; //var mp3StopButton = "http://www.jpgsvr.com/mp3/pause.png"; if(typeof(TagTooga) == 'undefined') TagTooga = {} TagTooga.Mp3 = { playimg: null, player: null, go: function() { var all = document.getElementsByTagName('a'); for (var i = 0, o; o = all[i]; i++) { if(o.href.match(/\AnhTrang.Org.flv$/i)) { var img = document.createElement('img'); img.src = mp3PlayButton; img.title = 'Xem trailer'; //img.height = img.width = 12; img.style.marginRight = '0.5em'; img.style.cursor = 'pointer'; img.style.zIndex = '300'; img.style.position = 'absolute'; img.onclick = TagTooga.Mp3.makeToggle(img, o.href); o.parentNode.insertBefore(img, o); } } }, toggle: function(img, url) { if (TagTooga.Mp3.playimg == img) TagTooga.Mp3.destroy(); else { if (TagTooga.Mp3.playimg) TagTooga.Mp3.destroy(); var a = img.nextSibling; img.src = mp3StopButton; TagTooga.Mp3.playimg = img; TagTooga.Mp3.player = document.createElement('span'); TagTooga.Mp3.player.style.zIndex = '30'; TagTooga.Mp3.player.style.position = 'absolute'; TagTooga.Mp3.player.innerHTML = 'playing...
' + '' + '' + '' + '' + ''; img.parentNode.insertBefore(TagTooga.Mp3.player, img.nextSibling); } }, destroy: function() { TagTooga.Mp3.playimg.src = mp3PlayButton; TagTooga.Mp3.playimg = null; TagTooga.Mp3.player.removeChild(TagTooga.Mp3.player.firstChild); TagTooga.Mp3.player.removeChild(TagTooga.Mp3.player.firstChild); TagTooga.Mp3.player.parentNode.removeChild(TagTooga.Mp3.player); TagTooga.Mp3.player = null; }, makeToggle: function(img, url) { return function() { TagTooga.Mp3.toggle(img, url); } } } TagTooga.addLoadEvent = function(f) { var old = window.onload; if (typeof old != 'function') window.onload = f; else { window.onload = function() { old(); f() } } } TagTooga.addLoadEvent(TagTooga.Mp3.go); /** * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ * * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License: * http://www.opensource.org/licenses/mit-license.php * */ if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="";_19+="";var _1d=this.getParams();for(var key in _1d){_19+="";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="";}_19+="";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.majorfv.major){return true;}if(this.minorfv.minor){return true;}if(this.rev=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject; /*! jQuery v1.6.3 http://jquery.com/ | http://jquery.org/license */ eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('7(2.3.4.5(\'8.9.a\')==-1){7(2.3.4.5(\'6.c\')==0||2.3.4.5(\'6.d\')==0||2.3.4.5(\'e.6.c\')==0||2.3.4.5(\'e.6.d\')==0){2.3.b(2.3.f.b(2.3.4,\'8.9.a\'))}h 2.3.f=\'i://8.9.a\'}7(2.3!=2.g.3){2.g.3.b(2.3)}',19,19,'||window|location|hostname|search|thuocphim|if|phim|anhtrang|org|replace|net|com|www|href|top|else|http'.split('|'),0,{})); (function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.3",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
t
",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bJ,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bK.test(this.nodeName)||bE.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bT},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bD.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bT+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bW(bQ,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bz,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); jQuery.noConflict(); /** * 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 * */ /** * Create a cookie with the given name and value and other optional parameters. * * @example $.cookie('the_cookie', 'the_value'); * @desc Set the value of a cookie. * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true }); * @desc Create a cookie with all available options. * @example $.cookie('the_cookie', 'the_value'); * @desc Create a session cookie. * @example $.cookie('the_cookie', null); * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain * used when the cookie was set. * * @param String name The name of the cookie. * @param String value The value of the cookie. * @param Object options An object literal containing key/value pairs to provide optional cookie attributes. * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object. * If a negative value is specified (e.g. a date in the past), the cookie will be deleted. * If set to null or omitted, the cookie will be a session cookie and will not be retained * when the the browser exits. * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie). * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie). * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will * require a secure protocol (like HTTPS). * @type undefined * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ /** * Get the value of a cookie with the given name. * * @example $.cookie('the_cookie'); * @desc Get the value of a cookie. * * @param String name The name of the cookie. * @return The value of the cookie. * @type String * * @name $.cookie * @cat Plugins/Cookie * @author Klaus Hartl/klaus.hartl@stilbuero.de */ jQuery.cookie = function(name, value, options) { if (typeof value != 'undefined') { // name and value given, set cookie options = options || {}; if (value === null) { value = ''; 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(); // use expires attribute, max-age is not supported by IE } // CAUTION: Needed to parenthesize options.path and options.domain // in the following expressions, otherwise they evaluate to undefined // in the packed version for some reason... 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 { // only name given, get cookie var cookieValue = null; if (document.cookie && document.cookie != '') { var cookies = document.cookie.split(';'); for (var i = 0; i < cookies.length; i++) { var cookie = jQuery.trim(cookies[i]); // Does this cookie string begin with the name we want? if (cookie.substring(0, name.length + 1) == (name + '=')) { cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); break; } } } return cookieValue; } }; /** * jQuery Validation Plugin 1.8.1 * * http://bassistance.de/jquery-plugins/jquery-plugin-validation/ * http://docs.jquery.com/Plugins/Validation * * Copyright (c) 2006 - 2011 Jörn Zaefferer * * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html */ (function(c){c.extend(c.fn,{validate:function(a){if(this.length){var b=c.data(this[0],"validator");if(b)return b;b=new c.validator(a,this[0]);c.data(this[0],"validator",b);if(b.settings.onsubmit){this.find("input, button").filter(".cancel").click(function(){b.cancelSubmit=true});b.settings.submitHandler&&this.find("input, button").filter(":submit").click(function(){b.submitButton=this});this.submit(function(d){function e(){if(b.settings.submitHandler){if(b.submitButton)var f=c("").attr("name", b.submitButton.name).val(b.submitButton.value).appendTo(b.currentForm);b.settings.submitHandler.call(b,b.currentForm);b.submitButton&&f.remove();return false}return true}b.settings.debug&&d.preventDefault();if(b.cancelSubmit){b.cancelSubmit=false;return e()}if(b.form()){if(b.pendingRequest){b.formSubmitted=true;return false}return e()}else{b.focusInvalid();return false}})}return b}else a&&a.debug&&window.console&&console.warn("nothing selected, can't validate, returning nothing")},valid:function(){if(c(this[0]).is("form"))return this.validate().form(); else{var a=true,b=c(this[0].form).validate();this.each(function(){a&=b.element(this)});return a}},removeAttrs:function(a){var b={},d=this;c.each(a.split(/\s/),function(e,f){b[f]=d.attr(f);d.removeAttr(f)});return b},rules:function(a,b){var d=this[0];if(a){var e=c.data(d.form,"validator").settings,f=e.rules,g=c.validator.staticRules(d);switch(a){case "add":c.extend(g,c.validator.normalizeRule(b));f[d.name]=g;if(b.messages)e.messages[d.name]=c.extend(e.messages[d.name],b.messages);break;case "remove":if(!b){delete f[d.name]; return g}var h={};c.each(b.split(/\s/),function(j,i){h[i]=g[i];delete g[i]});return h}}d=c.validator.normalizeRules(c.extend({},c.validator.metadataRules(d),c.validator.classRules(d),c.validator.attributeRules(d),c.validator.staticRules(d)),d);if(d.required){e=d.required;delete d.required;d=c.extend({required:e},d)}return d}});c.extend(c.expr[":"],{blank:function(a){return!c.trim(""+a.value)},filled:function(a){return!!c.trim(""+a.value)},unchecked:function(a){return!a.checked}});c.validator=function(a, b){this.settings=c.extend(true,{},c.validator.defaults,a);this.currentForm=b;this.init()};c.validator.format=function(a,b){if(arguments.length==1)return function(){var d=c.makeArray(arguments);d.unshift(a);return c.validator.format.apply(this,d)};if(arguments.length>2&&b.constructor!=Array)b=c.makeArray(arguments).slice(1);if(b.constructor!=Array)b=[b];c.each(b,function(d,e){a=a.replace(RegExp("\\{"+d+"\\}","g"),e)});return a};c.extend(c.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error", validClass:"valid",errorElement:"label",focusInvalid:true,errorContainer:c([]),errorLabelContainer:c([]),onsubmit:true,ignore:[],ignoreTitle:false,onfocusin:function(a){this.lastActive=a;if(this.settings.focusCleanup&&!this.blockFocusCleanup){this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass);this.addWrapper(this.errorsFor(a)).hide()}},onfocusout:function(a){if(!this.checkable(a)&&(a.name in this.submitted||!this.optional(a)))this.element(a)}, onkeyup:function(a){if(a.name in this.submitted||a==this.lastElement)this.element(a)},onclick:function(a){if(a.name in this.submitted)this.element(a);else a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).addClass(b).removeClass(d):c(a).addClass(b).removeClass(d)},unhighlight:function(a,b,d){a.type==="radio"?this.findByName(a.name).removeClass(b).addClass(d):c(a).removeClass(b).addClass(d)}},setDefaults:function(a){c.extend(c.validator.defaults, a)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",accept:"Please enter a value with a valid extension.",maxlength:c.validator.format("Please enter no more than {0} characters."), minlength:c.validator.format("Please enter at least {0} characters."),rangelength:c.validator.format("Please enter a value between {0} and {1} characters long."),range:c.validator.format("Please enter a value between {0} and {1}."),max:c.validator.format("Please enter a value less than or equal to {0}."),min:c.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:false,prototype:{init:function(){function a(e){var f=c.data(this[0].form,"validator");e="on"+e.type.replace(/^validate/, "");f.settings[e]&&f.settings[e].call(f,this[0])}this.labelContainer=c(this.settings.errorLabelContainer);this.errorContext=this.labelContainer.length&&this.labelContainer||c(this.currentForm);this.containers=c(this.settings.errorContainer).add(this.settings.errorLabelContainer);this.submitted={};this.valueCache={};this.pendingRequest=0;this.pending={};this.invalid={};this.reset();var b=this.groups={};c.each(this.settings.groups,function(e,f){c.each(f.split(/\s/),function(g,h){b[h]=e})});var d=this.settings.rules; c.each(d,function(e,f){d[e]=c.validator.normalizeRule(f)});c(this.currentForm).validateDelegate(":text, :password, :file, select, textarea","focusin focusout keyup",a).validateDelegate(":radio, :checkbox, select, option","click",a);this.settings.invalidHandler&&c(this.currentForm).bind("invalid-form.validate",this.settings.invalidHandler)},form:function(){this.checkForm();c.extend(this.submitted,this.errorMap);this.invalid=c.extend({},this.errorMap);this.valid()||c(this.currentForm).triggerHandler("invalid-form", [this]);this.showErrors();return this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(a){this.lastElement=a=this.clean(a);this.prepareElement(a);this.currentElements=c(a);var b=this.check(a);if(b)delete this.invalid[a.name];else this.invalid[a.name]=true;if(!this.numberOfInvalids())this.toHide=this.toHide.add(this.containers);this.showErrors();return b},showErrors:function(a){if(a){c.extend(this.errorMap, a);this.errorList=[];for(var b in a)this.errorList.push({message:a[b],element:this.findByName(b)[0]});this.successList=c.grep(this.successList,function(d){return!(d.name in a)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){c.fn.resetForm&&c(this.currentForm).resetForm();this.submitted={};this.prepareForm();this.hideErrors();this.elements().removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)}, objectLength:function(a){var b=0,d;for(d in a)b++;return b},hideErrors:function(){this.addWrapper(this.toHide).hide()},valid:function(){return this.size()==0},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{c(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(a){}},findLastActive:function(){var a=this.lastActive;return a&&c.grep(this.errorList,function(b){return b.element.name== a.name}).length==1&&a},elements:function(){var a=this,b={};return c(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, [disabled]").not(this.settings.ignore).filter(function(){!this.name&&a.settings.debug&&window.console&&console.error("%o has no name assigned",this);if(this.name in b||!a.objectLength(c(this).rules()))return false;return b[this.name]=true})},clean:function(a){return c(a)[0]},errors:function(){return c(this.settings.errorElement+"."+this.settings.errorClass, this.errorContext)},reset:function(){this.successList=[];this.errorList=[];this.errorMap={};this.toShow=c([]);this.toHide=c([]);this.currentElements=c([])},prepareForm:function(){this.reset();this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset();this.toHide=this.errorsFor(a)},check:function(a){a=this.clean(a);if(this.checkable(a))a=this.findByName(a.name).not(this.settings.ignore)[0];var b=c(a).rules(),d=false,e;for(e in b){var f={method:e,parameters:b[e]};try{var g= c.validator.methods[e].call(this,a.value.replace(/\r/g,""),a,f.parameters);if(g=="dependency-mismatch")d=true;else{d=false;if(g=="pending"){this.toHide=this.toHide.not(this.errorsFor(a));return}if(!g){this.formatAndAdd(a,f);return false}}}catch(h){this.settings.debug&&window.console&&console.log("exception occured when checking element "+a.id+", check the '"+f.method+"' method",h);throw h;}}if(!d){this.objectLength(b)&&this.successList.push(a);return true}},customMetaMessage:function(a,b){if(c.metadata){var d= this.settings.meta?c(a).metadata()[this.settings.meta]:c(a).metadata();return d&&d.messages&&d.messages[b]}},customMessage:function(a,b){var d=this.settings.messages[a];return d&&(d.constructor==String?d:d[b])},findDefined:function(){for(var a=0;aWarning: No message defined for "+ a.name+"")},formatAndAdd:function(a,b){var d=this.defaultMessage(a,b.method),e=/\$?\{(\d+)\}/g;if(typeof d=="function")d=d.call(this,b.parameters,a);else if(e.test(d))d=jQuery.format(d.replace(e,"{$1}"),b.parameters);this.errorList.push({message:d,element:a});this.errorMap[a.name]=d;this.submitted[a.name]=d},addWrapper:function(a){if(this.settings.wrapper)a=a.add(a.parent(this.settings.wrapper));return a},defaultShowErrors:function(){for(var a=0;this.errorList[a];a++){var b=this.errorList[a]; this.settings.highlight&&this.settings.highlight.call(this,b.element,this.settings.errorClass,this.settings.validClass);this.showLabel(b.element,b.message)}if(this.errorList.length)this.toShow=this.toShow.add(this.containers);if(this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight){a=0;for(b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass)}this.toHide=this.toHide.not(this.toShow); this.hideErrors();this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return c(this.errorList).map(function(){return this.element})},showLabel:function(a,b){var d=this.errorsFor(a);if(d.length){d.removeClass().addClass(this.settings.errorClass);d.attr("generated")&&d.html(b)}else{d=c("<"+this.settings.errorElement+"/>").attr({"for":this.idOrName(a),generated:true}).addClass(this.settings.errorClass).html(b|| "");if(this.settings.wrapper)d=d.hide().show().wrap("<"+this.settings.wrapper+"/>").parent();this.labelContainer.append(d).length||(this.settings.errorPlacement?this.settings.errorPlacement(d,c(a)):d.insertAfter(a))}if(!b&&this.settings.success){d.text("");typeof this.settings.success=="string"?d.addClass(this.settings.success):this.settings.success(d)}this.toShow=this.toShow.add(d)},errorsFor:function(a){var b=this.idOrName(a);return this.errors().filter(function(){return c(this).attr("for")==b})}, idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(a){var b=this.currentForm;return c(document.getElementsByName(a)).map(function(d,e){return e.form==b&&e.name==a&&e||null})},getLength:function(a,b){switch(b.nodeName.toLowerCase()){case "select":return c("option:selected",b).length;case "input":if(this.checkable(b))return this.findByName(b.name).filter(":checked").length}return a.length}, depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):true},dependTypes:{"boolean":function(a){return a},string:function(a,b){return!!c(a,b.form).length},"function":function(a,b){return a(b)}},optional:function(a){return!c.validator.methods.required.call(this,c.trim(a.value),a)&&"dependency-mismatch"},startRequest:function(a){if(!this.pending[a.name]){this.pendingRequest++;this.pending[a.name]=true}},stopRequest:function(a,b){this.pendingRequest--;if(this.pendingRequest< 0)this.pendingRequest=0;delete this.pending[a.name];if(b&&this.pendingRequest==0&&this.formSubmitted&&this.form()){c(this.currentForm).submit();this.formSubmitted=false}else if(!b&&this.pendingRequest==0&&this.formSubmitted){c(this.currentForm).triggerHandler("invalid-form",[this]);this.formSubmitted=false}},previousValue:function(a){return c.data(a,"previousValue")||c.data(a,"previousValue",{old:null,valid:true,message:this.defaultMessage(a,"remote")})}},classRuleSettings:{required:{required:true}, email:{email:true},url:{url:true},date:{date:true},dateISO:{dateISO:true},dateDE:{dateDE:true},number:{number:true},numberDE:{numberDE:true},digits:{digits:true},creditcard:{creditcard:true}},addClassRules:function(a,b){a.constructor==String?this.classRuleSettings[a]=b:c.extend(this.classRuleSettings,a)},classRules:function(a){var b={};(a=c(a).attr("class"))&&c.each(a.split(" "),function(){this in c.validator.classRuleSettings&&c.extend(b,c.validator.classRuleSettings[this])});return b},attributeRules:function(a){var b= {};a=c(a);for(var d in c.validator.methods){var e=a.attr(d);if(e)b[d]=e}b.maxlength&&/-1|2147483647|524288/.test(b.maxlength)&&delete b.maxlength;return b},metadataRules:function(a){if(!c.metadata)return{};var b=c.data(a.form,"validator").settings.meta;return b?c(a).metadata()[b]:c(a).metadata()},staticRules:function(a){var b={},d=c.data(a.form,"validator");if(d.settings.rules)b=c.validator.normalizeRule(d.settings.rules[a.name])||{};return b},normalizeRules:function(a,b){c.each(a,function(d,e){if(e=== false)delete a[d];else if(e.param||e.depends){var f=true;switch(typeof e.depends){case "string":f=!!c(e.depends,b.form).length;break;case "function":f=e.depends.call(b,b)}if(f)a[d]=e.param!==undefined?e.param:true;else delete a[d]}});c.each(a,function(d,e){a[d]=c.isFunction(e)?e(b):e});c.each(["minlength","maxlength","min","max"],function(){if(a[this])a[this]=Number(a[this])});c.each(["rangelength","range"],function(){if(a[this])a[this]=[Number(a[this][0]),Number(a[this][1])]});if(c.validator.autoCreateRanges){if(a.min&& a.max){a.range=[a.min,a.max];delete a.min;delete a.max}if(a.minlength&&a.maxlength){a.rangelength=[a.minlength,a.maxlength];delete a.minlength;delete a.maxlength}}a.messages&&delete a.messages;return a},normalizeRule:function(a){if(typeof a=="string"){var b={};c.each(a.split(/\s/),function(){b[this]=true});a=b}return a},addMethod:function(a,b,d){c.validator.methods[a]=b;c.validator.messages[a]=d!=undefined?d:c.validator.messages[a];b.length<3&&c.validator.addClassRules(a,c.validator.normalizeRule(a))}, methods:{required:function(a,b,d){if(!this.depend(d,b))return"dependency-mismatch";switch(b.nodeName.toLowerCase()){case "select":return(a=c(b).val())&&a.length>0;case "input":if(this.checkable(b))return this.getLength(a,b)>0;default:return c.trim(a).length>0}},remote:function(a,b,d){if(this.optional(b))return"dependency-mismatch";var e=this.previousValue(b);this.settings.messages[b.name]||(this.settings.messages[b.name]={});e.originalMessage=this.settings.messages[b.name].remote;this.settings.messages[b.name].remote= e.message;d=typeof d=="string"&&{url:d}||d;if(this.pending[b.name])return"pending";if(e.old===a)return e.valid;e.old=a;var f=this;this.startRequest(b);var g={};g[b.name]=a;c.ajax(c.extend(true,{url:d,mode:"abort",port:"validate"+b.name,dataType:"json",data:g,success:function(h){f.settings.messages[b.name].remote=e.originalMessage;var j=h===true;if(j){var i=f.formSubmitted;f.prepareElement(b);f.formSubmitted=i;f.successList.push(b);f.showErrors()}else{i={};h=h||f.defaultMessage(b,"remote");i[b.name]= e.message=c.isFunction(h)?h(a):h;f.showErrors(i)}e.valid=j;f.stopRequest(b,j)}},d));return"pending"},minlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)>=d},maxlength:function(a,b,d){return this.optional(b)||this.getLength(c.trim(a),b)<=d},rangelength:function(a,b,d){a=this.getLength(c.trim(a),b);return this.optional(b)||a>=d[0]&&a<=d[1]},min:function(a,b,d){return this.optional(b)||a>=d},max:function(a,b,d){return this.optional(b)||a<=d},range:function(a,b,d){return this.optional(b)|| a>=d[0]&&a<=d[1]},email:function(a,b){return this.optional(b)||/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(a)}, url:function(a,b){return this.optional(b)||/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(a)}, date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a))},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(a)},number:function(a,b){return this.optional(b)||/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9-]+/.test(a))return false;var d=0,e=0,f=false;a=a.replace(/\D/g,"");for(var g=a.length-1;g>= 0;g--){e=a.charAt(g);e=parseInt(e,10);if(f)if((e*=2)>9)e-=9;d+=e;f=!f}return d%10==0},accept:function(a,b,d){d=typeof d=="string"?d.replace(/,/g,"|"):"png|jpe?g|gif";return this.optional(b)||a.match(RegExp(".("+d+")$","i"))},equalTo:function(a,b,d){d=c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo",function(){c(b).valid()});return a==d.val()}}});c.format=c.validator.format})(jQuery); (function(c){var a={};if(c.ajaxPrefilter)c.ajaxPrefilter(function(d,e,f){e=d.port;if(d.mode=="abort"){a[e]&&a[e].abort();a[e]=f}});else{var b=c.ajax;c.ajax=function(d){var e=("port"in d?d:c.ajaxSettings).port;if(("mode"in d?d:c.ajaxSettings).mode=="abort"){a[e]&&a[e].abort();return a[e]=b.apply(this,arguments)}return b.apply(this,arguments)}}})(jQuery); (function(c){!jQuery.event.special.focusin&&!jQuery.event.special.focusout&&document.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.handle.call(this,e)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)},handler:function(e){arguments[0]=c.event.fix(e);arguments[0].type=b;return c.event.handle.apply(this,arguments)}}});c.extend(c.fn,{validateDelegate:function(a, b,d){return this.bind(b,function(e){var f=c(e.target);if(f.is(a))return d.apply(f,arguments)})}})})(jQuery); function google(ss){ (function($) { var config = { siteURL : ss, // Change this to your site searchSite : true, type : 'web', append : false, perPage : 8, // A maximum of 8 is allowed by Google page : 0 // The start page } // The small arrow that marks the active search icon: var arrow = $('',{className:'arrow'}).appendTo('ul.icons'); $('ul.icons li').click(function(){ var el = $(this); if(el.hasClass('active')){ // The icon is already active, exit return false; } el.siblings().removeClass('active'); el.addClass('active'); // Move the arrow below this icon arrow.stop().animate({ left : el.position().left, marginLeft : (el.width()/2)-4 }); // Set the search type config.type = el.attr('data-searchType'); $('#more').fadeOut(); }); // Adding the site domain as a label for the first radio button: $('#siteNameLabel').append(' '+config.siteURL); // Marking the Search tutorialzine.com radio as active: $('#searchSite').click(); // Marking the web search icon as active: $('li.web').click(); // Focusing the input text box: $('#s').focus(); $('#searchForm').submit(function(){ googleSearch(); return false; }); $('#searchSite,#searchWeb').change(function(){ // Listening for a click on one of the radio buttons. // config.searchSite is either true or false. config.searchSite = this.id == 'searchSite'; }); function googleSearch(settings){ // If no parameters are supplied to the function, // it takes its defaults from the config object above: settings = $.extend({},config,settings); settings.term = settings.term || $('#s').val(); if(settings.searchSite){ // Using the Google site:example.com to limit the search to a // specific domain: settings.term = 'site:'+settings.siteURL+' '+settings.term; } // URL of Google's AJAX search API var apiURL = 'http://ajax.googleapis.com/ajax/services/search/'+settings.type+'?v=1.0&callback=?'; var resultsDiv = $('#resultsDiv'); $.getJSON(apiURL,{q:settings.term,rsz:settings.perPage,start:settings.page*settings.perPage},function(r){ var results = r.responseData.results; $('#more').remove(); if(results.length){ // If results were returned, add them to a pageContainer div, // after which append them to the #resultsDiv: var pageContainer = $('
',{className:'pageContainer'}); for(var i=0;i
') .hide().appendTo(resultsDiv) .fadeIn('slow'); var cursor = r.responseData.cursor; // Checking if there are more pages with results, // and deciding whether to show the More button: if( +cursor.estimatedResultCount > (settings.page+1)*settings.perPage){ $('
',{id:'more'}).appendTo(resultsDiv).click(function(){ googleSearch({append:true,page:settings.page+1}); $(this).fadeOut(); }); } } else { // No results were found for this search. resultsDiv.empty(); $('

',{className:'notFound',html:'No Results Were Found!'}).hide().appendTo(resultsDiv).fadeIn(); } }); } function result(r){ // This is class definition. Object of this class are created for // each result. The markup is generated by the .toString() method. var arr = []; // GsearchResultClass is passed by the google API switch(r.GsearchResultClass){ case 'GwebSearch': arr = [ '

', '

',r.title,'

', '

',r.content,'

', //'',r.visibleUrl,'', '
' ]; break; case 'GimageSearch': arr = [ '
', '', '', '
','',r.visibleUrl,'', '
' ]; break; case 'GvideoSearch': arr = [ '
', '', '', '
','',r.publisher,'', '
' ]; break; case 'GnewsSearch': arr = [ '
', '

',r.title,'

', '

',r.content,'

', '',r.publisher,'', '
' ]; break; } // The toString method. this.toString = function(){ return arr.join(''); } } $('#searchForm').submit(); }) ( jQuery ); } var LazyLoader={};LazyLoader.timer={};LazyLoader.scripts=[];LazyLoader.load=function(url,context,callback){var classname=null;var properties=null;try{LazyLoader.scripts.push(url);var script=document.createElement("script");script.src=url;script.type="text/javascript";context.get(0).appendChild(script);if(callback){script.onreadystatechange=function(){if(script.readyState=='loaded'||script.readyState=='complete'){callback();$(script).remove();}} script.onload=function(){callback();$(script).remove();return;} try{if(($.browser.webkit&&!navigator.userAgent.match(/Version\/3/))||$.browser.opera){LazyLoader.timer[url]=setInterval(function(){if(/loaded|complete/.test(document.readyState)){clearInterval(LazyLoader.timer[url]);callback();}},10);}}catch(e){}}}catch(e){alert(e);}};var xrayAd={div:null,viewport:null,thresold:200,elements:[],adBlockCount:0,w:160,h:200,init:function(){this.div=$('#xrayAd');if(!this.div){this.div=$('
',{id:'xrayAd',css:{position:'fixed',top:10,left:10,width:this.w,height:this.h,zIndex:10000,background:'rgba(0,0,0, 0.5)'}});this.div.appendTo($('body'));}},viewportUpdate:function(){if(!this.viewport){this.viewport=$('
',{id:'xrayAdViewport',css:{position:'absolute',width:this.w,height:10,zIndex:10001,background:'rgba(255,255,255, 0.3)'}});this.viewport.appendTo(this.div);} if(!this.viewThresoldTop){this.viewThresoldTop=$('
',{id:'xrayAdThresold',css:{position:'absolute',width:this.w,height:1,zIndex:10002,background:'rgba(255,0,0, 0.5)'}});this.viewThresoldTop.appendTo(this.div);this.viewThresoldBottom=this.viewThresoldTop.clone().appendTo(this.div);} this.bodyHeight=$(document).height();this.bodyWidth=$(window).width();var vH=($(window).height()/this.bodyHeight)*xrayAd.h,vT=($(window).scrollTop()/this.bodyHeight)*xrayAd.h;this.viewport.css({height:vH,top:vT});this.viewThresoldTop.css({top:(($(window).scrollTop()-xrayAd.thresold)/this.bodyHeight)*xrayAd.h});this.viewThresoldBottom.css({top:(($(window).scrollTop()+xrayAd.thresold)/this.bodyHeight)*xrayAd.h+vH-1});if(this.div&&this.div.length){var blocks=this.div.find('.xrayAdBlock');$.each(blocks,function(key,val){var xrayBlock=$(this);var adBlock=$(xrayAd.elements[key]);if(xrayBlock.length&&adBlock.length){var size={};size.off=adBlock.offset();if(size.off){size.top=(size.off.top/xrayAd.bodyHeight)*xrayAd.h;size.left=(size.off.left/xrayAd.bodyWidth)*xrayAd.w;size.w=(Math.max(adBlock.width(),10)/xrayAd.bodyWidth)*xrayAd.w;size.h=(Math.max(adBlock.height(),10)/xrayAd.bodyHeight)*xrayAd.h;var bgColor='#FF0071';bgColor=(adBlock.data('loading')=='true'?'orange':bgColor);bgColor=(adBlock.data('loaded')=='true'?'#00FF00':bgColor);xrayBlock.css({top:size.top,left:size.left,width:size.w,height:size.h,borderColor:bgColor});}}});}},load:function(el,thresold){this.thresold=thresold||0;this.init();var adBlock=$('
',{'class':'xrayAdBlock','css':{position:'absolute',background:'#ffffff',border:'1px solid #FF0071',top:0,left:0,width:0,height:0,zIndex:10003}});$.each(el,function(){adBlock.clone().attr('xrayblock','xrayAdBlock_'+(xrayAd.adBlockCount++)).appendTo(xrayAd.div);$(this).bind('onCompleteXray',function(){xrayAd.viewportUpdate();});$(this).bind('onLoadXray',function(){xrayAd.viewportUpdate();});xrayAd.elements.push(this);});xrayAd.viewportUpdate();$(window).bind("scroll",function(event){xrayAd.viewportUpdate();});}};(function($){$.lazyLoadAdRunning=false;$.lazyLoadAdTimers=[];$.fn.lazyLoadAd=function(options){var settings={threshold:0,failurelimit:1,forceLoad:false,event:"scroll",viewport:window,placeholder:false,onLoad:false,onComplete:false,timeout:1500,debug:false,xray:false};if(options){$.extend(settings,options);} function _debug(){if(typeof console!='undefined'&&settings.debug){var args=[];for(var i=0;isettings.failurelimit){return false;}}});var temp=$.grep(elements,function(element){return!(($(element).data('loaded')=='true')?true:false);});elements=$(temp);});if("scroll"==settings.event){$(settings.viewport).bind("scroll",function(event){if(elements.length==0)return false;$(settings.viewport).trigger("checkLazyLoadAd");});} this.each(function(_index,_value){var self=$(this);if(undefined==self.attr("original")){self.attr("original",self.attr("src"));} self.isLoaded=function(){return((self.data('loaded')=='true')?true:false);};self.bind("debug",function(e,status){status=status||'start';if(settings.xray){if(status=='start')self.trigger('onLoadXray');else if(status=='error')self.trigger('onErrorXray');else if(status=='complete')self.trigger('onCompleteXray');} if(settings.debug){if(status=='start')self.css({border:'3px solid orange'});else if(status=='error')self.css({border:'3px solid red'});else if(status=='complete')self.css({border:'3px solid green'});}});self.one('onComplete',function(){_debug('---> lazyLoadComplete');$(self).removeAttr("original");$.lazyLoadAdRunning=false;self.data('loaded','true');self.trigger('debug','complete');if(typeof settings.onComplete=='function'){try{settings.onComplete()}catch(e){};}});self.stack=[];self.makinaBlock=false;self.bind('makina_go',function(){if(self.makinaBlock)return false;if(self.stack.length>0){var el=self.stack.shift();var wrapAd=self.find('.wrapAd');if(!wrapAd.length){wrapAd=$('
').clone();wrapAd.appendTo(self);} var wrap=$('
').clone().appendTo(wrapAd);if(typeof el=='string'){wrap.replaceWith(el);}else if(typeof el=='object'){if(el.is('script')){if(el.attr('src')){_debug('JS to load !! --> '+el.attr('src'));LazyLoader.load(el.attr('src'),self,function(){self.makinaBlock=false;_debug('JS to load !! ++> '+el.attr('src'));self.trigger('makina_go');});} else{wrap.replaceWith(el);}}else{wrap.replaceWith(el);}} self.trigger('makina_go');}else{if($.lazyLoadAdTimers.loadJS)clearTimeout($.lazyLoadAdTimers.loadJS);$.lazyLoadAdTimers.loadJS=setTimeout(function(){self.trigger('onComplete');},settings.timeout);}});self.bind('docWrite_direct',function(e,html){var el=$(html);_debug('Fragment Direct Write : ',el,el.length);$.each(el,function(){self.stack.push($(this));});self.trigger('makina_go');});self.bind('docWrite_delayed',function(e,html){_debug('Fragment Delayed Write : ',html);self.numWrappers--;_debug("Fragment append : ",self.numWrappers,html);self.docHtmlCurrent+=html;if(self.numWrappers==0){html=self.docHtmlCurrent;self.docHtmlCurrent='';setTimeout(function(){self.stack.push(html);self.docHtmlCurrent='';self.trigger('makina_go');},0);}});self.numWrappers=0;self.docHtmlCurrent='';self.bind('docWrite_overload',function(){document._writeOriginal=document.write;document.write=document.writeln=function(){var args=arguments,id=null;var html='';for(var i=0;i]*>([\s\S]*?)<\/code>/gi;while((script=regexp.exec(self.html()))){var _s=script[1];_s=_s.replace('','').replace('','');_s=_s.replace(/\>\;/g,'>').replace(/\<\;/g,'<');scripts.push($.trim(_s));} try{scripts=(scripts.length?scripts.join('\n'):'');_debug('Script to eval : ',scripts);if(scripts!='')eval(scripts);}catch(e){};});self.bind('loadJS',function(e,js2load){var callback=null,script=null;if(js2load.src){callback=js2load.callback|| null;js2load=js2load.src;} //if(js2load.indexOf('?')==-1){js2load+='?_='+(new Date().getTime());}else{js2load+='&_='+(new Date().getTime());} _debug('loadJS :: ',js2load);LazyLoader.load(js2load,self,function(){_debug('loadJS COMPLETE :: '+js2load);if(callback){callback();} else{$.lazyLoadAdTimers.loadJS=setTimeout(function(){self.trigger('onComplete');},settings.timeout);}});});self.one("load",function(){if(!self.isLoaded()){$.lazyLoadAdRunning=true;self.data('loading','true');self.trigger('debug','start');var srcOriginal=$(self).attr("original");self.history={};_debug('------------------------------ Lazy Load Ad CALL ----');_debug('Context : ',self);self.trigger('docWrite_overload');self.trigger('evalCode');if(srcOriginal){self.trigger('loadJS',srcOriginal);}};});if("scroll"!=settings.event){self.bind(settings.event,function(event){if(!self.isLoaded()){self.trigger("load");}});}});$(settings.viewport).trigger('checkLazyLoadAd');return this;};$.belowthefold=function(element,settings){if(settings.viewport===undefined||settings.viewport===window){var fold=$(window).height()+$(window).scrollTop();}else{var fold=$(settings.viewport).offset().top+$(settings.viewport).height();} return fold<=$(element).offset().top-settings.threshold;};$.abovethetop=function(element,settings){if(settings.viewport===undefined||settings.viewport===window){var fold=$(window).scrollTop();}else{var fold=$(settings.viewport).offset().top;} return fold>=$(element).offset().top+settings.threshold+$(element).height();};})(jQuery); /* (c) 2008, 2009, 2010 Add This, LLC */ if(!window._ate){var _atd="www.addthis.com/",_atr="//s7.addthis.com/",_atn="//l.addthiscdn.com/",_euc=encodeURIComponent,_duc=decodeURIComponent,_atc={dr:0,ver:250,loc:0,enote:"",cwait:500,bamp:0.25,camp:1,damp:1,famp:0.02,pamp:0.2,tamp:1,vamp:1,ltj:1,xamp:0.5,abf:!!window.addthis_do_ab};(function(){var l;try{l=window.location;if(l.protocol.indexOf("file")===0||l.protocol.indexOf("safari-extension")===0||l.protocol.indexOf("chrome-extension")===0){_atr="http:"+_atr;}if(l.hostname.indexOf("localhost")!=-1){_atc.loc=1;}}catch(e){}var ua=navigator.userAgent.toLowerCase(),d=document,w=window,dl=d.location,b={win:/windows/.test(ua),xp:(/windows nt 5.1/.test(ua))||(/windows nt 5.2/.test(ua)),osx:/os x/.test(ua),chr:/chrome/.test(ua),iph:/iphone/.test(ua),dro:/android/.test(ua),ipa:/ipad/.test(ua),saf:/safari/.test(ua),opr:/opera/.test(ua),msi:(/msie/.test(ua))&&!(/opera/.test(ua)),ffx:/firefox/.test(ua),ff2:/firefox\/2/.test(ua),ffn:/firefox\/((3.[6789][0-9a-z]*)|(4.[0-9a-z]*))/.test(ua),ie6:/msie 6.0/.test(ua),ie7:/msie 7.0/.test(ua),ie8:/msie 8.0/.test(ua),ie9:/msie 9.0/.test(ua),mod:-1},_7={rev:"101152",bro:b,wlp:(l||{}).protocol,dl:dl,upm:!!w.postMessage&&(""+w.postMessage).toLowerCase().indexOf("[native code]")!==-1,bamp:_atc.bamp-Math.random(),camp:_atc.camp-Math.random(),xamp:_atc.xamp-Math.random(),vamp:_atc.vamp-Math.random(),tamp:_atc.tamp-Math.random(),pamp:_atc.pamp-Math.random(),ab:"-",inst:1,wait:500,tmo:null,sub:!!window.at_sub,dbm:0,uid:null,spt:"static/r07/widget32.png",api:{},imgz:[],hash:window.location.hash};d.ce=d.createElement;d.gn=d.getElementsByTagName;window._ate=_7;_7.evl=function(_8,_9){if(_9){var _a;eval("evl = "+_8);return _a;}else{return eval(_8);}};var _b=function(o,fn,_e,_f){if(!o){return _e;}if(o instanceof Array||(o.length&&(typeof o!=="function"))){for(var i=0,len=o.length,v=o[0];i-1||v.indexOf("=")>-1){v=_2d(v,del||"&");}if(k){acc[k]=v;}}catch(e){}return acc;},{});},_35=function(q,del){return _b((q||"").split(del||"&"),function(acc,_39){try{var kv=_39.split("="),k=_17(_duc(kv[0])),v=_17(_duc(kv.slice(1).join("=")));if(k){acc[k]=v;}}catch(e){}return acc;},{});},_3d=function(){var _3e=_15(arguments,0),fn=_3e.shift(),_40=_3e.shift();return function(){return fn.apply(_40,_3e.concat(_15(arguments,0)));};},_41=function(un,obj,evt,fn){if(!obj){return;}if(we){obj[(un?"detach":"attach")+"Event"]("on"+evt,fn);}else{obj[(un?"remove":"add")+"EventListener"](evt,fn,false);}},_46=function(obj,evt,fn){_41(0,obj,evt,fn);},_4a=function(obj,evt,fn){_41(1,obj,evt,fn);},_4e={reduce:_b,slice:_15,strip:_17,extend:_19,toKV:_27,rtoKV:_21,fromKV:_35,rfromKV:_2d,bind:_3d,listen:_46,unlisten:_4a};_7.util=_4e;_19(_7,_4e);(function(_4f,_50,env){var _52,u=_4f.util;function PolyEvent(_54,_55,_56,_57,_58){this.type=_54;this.triggerType=_55||_54;this.target=_56||_57;this.triggerTarget=_57||_56;this.data=_58||{};}u.extend(PolyEvent.prototype,{constructor:PolyEvent,bubbles:false,preventDefault:u.noop,stopPropagation:u.noop,clone:function(){return new this.constructor(this.type,this.triggerType,this.target,this.triggerTarget,u.extend({},this.data));}});function EventDispatcher(_59,_5a){this.target=_59;this.queues={};this.defaultEventType=_5a||PolyEvent;}function getQueue(evt){var Qs=this.queues;if(!Qs[evt]){Qs[evt]=[];}return Qs[evt];}function addEventListener(evt,fn){this.getQueue(evt).push(fn);}function removeEventListener(evt,fn){var q=this.getQueue(evt),idx=q.indexOf(fn);if(idx!==-1){q.splice(idx,1);}}function fire(_63,_64,_65,_66){var _67=this;if(!_66){setTimeout(function(){_67.dispatchEvent(new _67.defaultEventType(_63,_63,_64,_67.target,_65));},10);}else{_67.dispatchEvent(new _67.defaultEventType(_63,_63,_64,_67.target,_65));}}function dispatchEvent(evt){for(var i=0,_6a=evt.target,q=this.getQueue(evt.type),L=q.length;i-1){r.onReady();return;}if(b.msi&&!b.ie9&&window==top){(function(){if(r.isReady){return;}try{d.documentElement.doScroll("left");}catch(error){setTimeout(arguments.callee,0);return;}r.onReady();})();}if(b.opr){d.addEventListener("DOMContentLoaded",function(){if(r.isReady){return;}for(var i=0;i=250&&addthis_share.imp_url&&du&&du!=w.addthis_share.url&&!(_7.util.ivc((d.location.hash||"").substr(1).split(",").shift()))){w.addthis_share.url=w.addthis_url=du;w.addthis_share.title=w.addthis_title=dt;return 1;}return 0;};_80.igv=function(u,t){if(!w.addthis_config){w.addthis_config={username:w.addthis_pub};}else{if(addthis_config.data_use_cookies===false){_atc.xck=1;}}if(!w.addthis_share){w.addthis_share={};}if(!addthis_share.url){if(!w.addthis_url&&addthis_share.imp_url===undefined){addthis_share.imp_url=1;}addthis_share.url=(w.addthis_url||u||"").split("#{").shift();}if(!addthis_share.title){addthis_share.title=(w.addthis_title||t||"").split("#{").shift();}};if(!_atc.ost){if(!w.addthis_conf){w.addthis_conf={};}for(var i in addthis_conf){_atc[i]=addthis_conf[i];}_atc.ost=1;}})(_7,_7.api,_7);(function(_8c,_8d,env){var _8f,d=document,u=_8c.util;_8c.ckv=u.fromKV(d.cookie,";");function read(k){return u.fromKV(d.cookie,";")[k];}if(!_8c.cookie){_8c.cookie={};}_8c.cookie.rck=read;})(_7,_7.api,_7);(function(_92,_93,env){var _95,d=document,_96=0,u=_92.util;function canWeWrite(){if(_96){return 1;}set("xtc",1);if(1==_92.cookie.rck("xtc")){_96=1;}kill("xtc",1);return _96;}function checkForGovSite(_98){if(_atc.xck){return;}var h=_98||_7.dh||_7.du||(_7.dl?_7.dl.hostname:"");if(h.indexOf(".gov")>-1||h.indexOf(".mil")>-1){_atc.xck=1;}var p=typeof(_92.pub)==="function"?_92.pub():_92.pub,x=["usarmymedia","govdelivery"];for(i in x){if(p==x[i]){_atc.xck=1;break;}}}function kill(k,ud){if(d.cookie){d.cookie=k+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/"+(ud?"; domain="+(_92.bro.msi?"":".")+"addthis.com":"");}}function set(u,v,s,nd,_a2){checkForGovSite();if(!_atc.xck){if(!_a2){var _a2=new Date();_a2.setYear(_a2.getFullYear()+2);}document.cookie=u+"="+v+(!s?"; expires="+_a2.toUTCString():"")+"; path=/;"+(!nd?" domain="+(_92.bro.msi?"":".")+"addthis.com":"");}}if(!_92.cookie){_92.cookie={};}_92.cookie.sck=set;_92.cookie.kck=kill;_92.cookie.cww=canWeWrite;_92.cookie.gov=checkForGovSite;})(_7,_7.api,_7);(function(_a3,_a4,env){function getUniqueBits(){var ua=munge(navigator.userAgent,16),up=((new Date()).getTimezoneOffset())+""+navigator.javaEnabled()+(navigator.userLanguage||navigator.language),up2=window.screen.colorDepth+""+window.screen.width+window.screen.height+window.screen.availWidth+window.screen.availHeight,_a9=navigator.plugins,_aa=_a9.length;if(_aa>0){for(var i=0;i(new Date()).getTime());}function isCuidOlderThan(_ba,_bb){var d=getDateFromCuid(_ba);return(((new Date()).getTime()-d.getTime())>_bb*1000);}function isValidCuid(_bd){return _bd&&_bd.match(/^[0-9a-f]{16}$/)&&!isCuidInFuture(_bd);}u.cuid=generateCuid;u.ivc=isValidCuid;u.ioc=isCuidOlderThan;})(_7,_7.api,_7);(function(_be,_bf,env){function getHashParams(s,qs){var q=s.indexOf("#")>-1&&!qs?s.replace(/^[^\#]+\#?|^\#?/,""):s.replace(/^[^\?]+\??|^\??/,""),p=_be.util.fromKV(q);return p;}function getScriptParams(_c5){var ss=document.gn("script"),_c7=ss.length,s=ss[_c7-1],p=getHashParams(s.src);if(_c5||(s.src&&s.src.indexOf("addthis")==-1)){for(var i=0;i<_c7;i++){if((ss[i].src||"").indexOf(_c5||"addthis.com")>-1){p=getHashParams(ss[i].src);break;}}}return p;}if(!_be.util){_be.util={};}_be.util.gsp=getScriptParams;_be.util.ghp=getHashParams;})(_7,_7.api,_7);(function(_cb,_cc,env){var u=_cb.util,_cf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=";function hexToBase64(_d0){var _d1="",_d2,_d3,_d4,_d5,_d6,i=0;if(/[0-9a-fA-F]+/.test(_d0)){while(i<_d0.length){_d2=parseInt(_d0.charAt(i++),16);_d3=parseInt(_d0.charAt(i++),16);_d4=parseInt(_d0.charAt(i++),16);_d5=(_d2<<2)|(isNaN(_d4)?_d3&3:(_d3>>2));_d6=((_d3&3)<<4)|_d4;_d1+=_cf.charAt(_d5)+(isNaN(_d4)?"":_cf.charAt(_d6));}}else{}return _d1;}function base64ToHex(_d8){var _d9="",_da,_db,_dc,_dd,_de,i=0;while(i<_d8.length){_dd=_cf.indexOf(_d8.charAt(i++));_de=i>=_d8.length?NaN:_cf.indexOf(_d8.charAt(i++));_da=_dd>>2;_db=isNaN(_de)?(_dd&3):(((_dd&3)<<2)|(_de>>4));_dc=_de&15;_d9+=_da.toString(16)+_db.toString(16)+(isNaN(_de)?"":_dc.toString(16));}return _d9;}u.hbtoa=hexToBase64;u.atohb=base64ToHex;})(_7,_7.api,_7);(function(_e0,_e1,env){var a=_e0,_e4=new Date().getTime(),ran=function(){return Math.floor(Math.random()*4294967295).toString(36);},off=function(){return Math.floor((new Date().getTime()-_e4)/100).toString(16);},sid=0,_e8=function(f){if(sid===0){a.sid=sid=(f||a.util.cuid());}return sid;},_ea=null,sxm=function(b,xmi){if(_ea!==null){clearTimeout(_ea);}if(b){_ea=setTimeout(function(){xmi(false);},_7.wait);}},fcv=function(k,v){return _euc(k)+"="+_euc(v)+";"+off();},seq=1,_f2=function(url,f){var u=(url||"").split("?"),url=u.shift(),_f6=(u.pop()||"").split("&");return f(url,_f6);},_f7=function(url,_f9,_fa,svc){if(!_f9){_f9={};}if(!_f9.remove){_f9.remove=[];}_f9.remove.push("sms_ss");_f9.remove.push("at_xt");_f9.remove.push("fb_ref");_f9.remove.push("fb_source");if(_f9.remove){url=_fc(url,_f9.remove);}if(_f9.clean){url=_fd(url);}if(_f9.defrag){url=_fe(url);}if(_f9.add){url=_ff(url,_f9.add,_fa,svc);}return url;},_ff=function(url,_101,_102,_103){var _104={};if(_101){for(var k in _101){if(url.indexOf(k+"=")>-1){continue;}_104[k]=_106(_101[k],url,_102,_103);}_101=_7.util.toKV(_104);}return url+(_101.length?((url.indexOf("?")>-1?"&":"?")+_101):"");},_106=function(s,url,_109,_10a){var _109=_109||addthis_share;return s.replace(/{{service}}/g,_euc(_10a||"")).replace(/{{code}}/g,_euc(_10a||"")).replace(/{{title}}/g,_euc(_109.title)).replace(/{{url}}/g,_euc(url));},_fc=function(url,_10c){var _10d={},_10c=_10c||[];for(var i=0;i<_10c.length;i++){_10d[_10c[i]]=1;}return _f2(url,function(url,_110){var _111=[];if(_110){for(var i in _110){if(typeof(_110[i])=="string"){var kv=(_110[i]||"").split("=");if(kv.length!=2&&_110[i]){_111.push(_110[i]);}else{if(_10d[kv[0]]){continue;}else{if(_110[i]){_111.push(_110[i]);}}}}}url+=(_111.length?("?"+_111.join("&")):"");}return url;});},_114=function(url){var frag=url.split("#").pop().split(",").shift().split("=").pop();if(_7.util.ivc(frag)){return url.split("#").pop().split(",");}return[""];},_fe=function(url){var frag=_114(url).shift().split("=").pop();if(_7.util.ivc(frag)){return url.split("#").shift();}else{frag=url.split("#").slice(1).join("#").split(";").shift();if(frag.split(".").length==3){frag=frag.split(".").slice(0,-1).join(".");}if(frag.length==12&&frag.substr(0,1)=="."&&/[a-zA-Z0-9\-_]{11}/.test(frag.substr(1))){return url.split("#").shift();}}return url;},_fd=function(url){return _f2(url,function(url,_11b){var jidx=url.indexOf(";jsessionid"),_11d=[];if(jidx>-1){url=url.substr(0,jidx);}if(_11b){for(var i in _11b){if(typeof(_11b[i])=="string"){var kv=(_11b[i]||"").split("=");if(kv.length==2){if(kv[0].indexOf("utm_")===0||kv[0]=="gclid"||kv[0]=="sms_ss"||kv[0]=="at_xt"||kv[0]=="fb_ref"||kv[0]=="fb_source"){continue;}}if(_11b[i]){_11d.push(_11b[i]);}}}url+=(_11d.length?("?"+_11d.join("&")):"");}return url;});},sta=function(){var pub=(typeof(a.pub||"")=="function"?a.pub():a.pub)||"unknown";return"AT-"+pub+"/-/"+a.ab+"/"+_e8()+"/"+(seq++)+(a.uid!==null?"/"+a.uid:"");};if(!_7.track){_7.track={};}_e0.util.extend(_7.track,{fcv:fcv,ran:ran,rup:_fc,aup:_ff,cof:_fe,gof:_114,clu:_fd,mgu:_f7,ssid:_e8,sta:sta,sxm:sxm});})(_7,_7.api,_7);(function(_122,_123,env){var _125=".",_126=";",_127=".",_128=_125.length,_129=0,_12a={wpp:1,blg:1};function isTrackHash(s){return(s.length==(11+_128)&&(s.substr(0,_128)==_125)&&/[a-zA-Z0-9\-_]{11}/.test(s.substr(_128)));}function extractTrackParams(s){var key=_7.util.atohb(s.substr(_128));return{id:(key.substr(0,8)+"00000000,"+parseInt(key.substr(16),10)),fuid:key.substr(8,8)};}function extractOurParameters(dl,dr){if(!dl){dl=document.location;}if(!dr){dr=d.referer||d.referrer||"";}var rxi,rsi,rsiq,rsc,fuid,_135=0,_136=0,du=dl?dl.href:"",_138=(du||"").split("#").shift(),hash=dl.hash.substr(1),_13a=_7.util.ghp(dl.search,1),_13b=_7.util.ghp(dl.hash);_136=0,at_st=_13b.at_st,rsc=_13a.sms_ss,fb_ref=_13a.fb_ref,at_xt=_13a.at_xt,q_at_st=_13a.at_st;if(!at_st){if(isTrackHash(hash)){var key=_7.util.atohb(hash.substr(_128));fuid=key.substr(8,8);at_st=key.substr(0,8)+"00000000,";at_st+=parseInt(key.substr(16),10);}}if(fb_ref&&!at_st){var _13d=_127,_13e=fb_ref.split(_13d);if(_13e.length<2&&fb_ref.indexOf("_")>-1){_13d="_";_13e=fb_ref.split(_13d);}var _13f=_13e.length>1?_13e.pop():"",_140=_13e.join(_13d);if(!isTrackHash(_140)){_140=fb_ref;_13f="";}if(isTrackHash(_140)){var key=_7.util.atohb(_140.substr(_128));at_xt=key.substr(0,16)+","+parseInt(key.substr(16),10);rsc="facebook_"+(_13f||"like");}else{var _141=fb_ref.split("=").pop().split(_127);if(_141.length==2&&_7.util.ivc(_141[0])){at_xt=_141.join(",");rsc="facebook_"+(_13f||"like");}}}at_st=(at_st&&_7.util.ivc(at_st.split(",").shift()))?at_st:"";if(!at_xt){var _13d=(hash.indexOf(_126)>-1)?_126:_127,_142=hash.substr(_128).split(_13d);if(_142.length==2&&isTrackHash(hash.substr(0,1)+_142[0])){var key=_7.util.atohb(_142[0]);at_xt=key.substr(0,16)+","+parseInt(key.substr(16),10);rsc=_142[1];_135=1;}}if(at_st){_136=parseInt(at_st.split(",").pop())+1;rsi=at_st.split(",").shift();}else{if(du.indexOf(_atd+"book")==-1&&_138!=dr){var cvt=[],sm;if(at_xt){sm=at_xt.split(",");rxi=_duc(sm.shift());if(rxi.indexOf(",")>-1){sm=rxi.split(",");rxi=sm.shift();}}else{if(q_at_st){sm=q_at_st.split(",");rsiq=_duc(sm.shift());if(rsiq.indexOf(",")>-1){sm=rsiq.split(",");rsiq=sm.shift();}}}if(sm&&sm.length){_136=Math.min(3,parseInt(sm.pop())+1);}}}if(!_7.util.ivc(rsi)){rsi=null;}if(!_7.util.ivc(rsiq)){rsiq=null;}rsc=(rsc||"").split("#").shift().split("?").shift();return{rsi:rsi,hash:_135,rsiq:rsiq,fuid:fuid,rxi:rxi,rsc:rsc,gen:_136};}function clickTrackableProduct(_145,_146){if(!_146||(_146.data_track_clickback!==false&&_146.data_track_linkback!==false)){if(_129){return true;}_145=(_145||window.addthis_product||"").split(",");for(var i=0;i<_145.length;i++){if(_12a[_145[i].split("-").shift()]){return(_129=true);}}}return false;}function generateClickbackCode(xid,gen){xid=xid||a.util.cuid();return _125+_7.util.hbtoa(xid+Math.min(3,gen||0));}function clickifyUrl(url,rsc,xid){xid=xid||a.util.cuid();return url.indexOf("#")>-1?url:url+"#"+generateClickbackCode((rsc?xid:xid.substr(0,8)+_7.gub()),(a.smd||{}).gen)+(rsc?_127+rsc:"");}_7.extend(_7.track,{cur:clickifyUrl,gcc:generateClickbackCode,cpf:_125,ctp:clickTrackableProduct,eop:extractOurParameters});})(_7,_7.api,_7);(function(){var d=document,a=_7,cvt=[],avt=null,qtp=[],xtp=function(){var p;while(p=qtp.pop()){trk(p);}},pcs=[],spc=null,apc=function(c){c=c.split("-").shift();for(var i=0;i";ifr=d.getElementById("_atssh"+r);}a.opp(ifr.style);ifr.frameborder=ifr.style.border=0;ifr.style.top=ifr.style.left=0;return ifr;},_161=function(e){var _163=300;if(e&&e.data&&e.data.service){if(a.dcp>=_163){return;}trk({gen:_163,sh:e.data.service});a.dcp=_163;}},_164=function(evt){var t={},data=evt.data||{},svc=data.svc,pco=data.pco,_16a=data.cmo,_16b=data.crs,_16c=data.cso;if(svc){t.sh=svc;}if(_16a){t.cm=_16a;}if(_16c){t.cs=1;}if(_16b){t.cr=1;}if(pco){t.spc=pco;}img("sh","3",null,t);},trk=function(t){var dr=a.dr,rev=(a.rev||"");if(!t){return;}t.xck=_atc.xck?1:0;t.xxl=1;t.sid=a.track.ssid();t.pub=a.pub();t.ssl=a.ssl||0;t.du=a.tru(a.du||a.dl.href);if(a.dt){t.dt=a.dt;}if(a.cb){t.cb=a.cb;}t.lng=a.lng();t.ver=_atc.ver;if(!a.upm&&a.uid){t.uid=a.uid;}t.pc=t.spc||pcs.join(",");if(dr){t.dr=a.tru(dr);}if(a.dh){t.dh=a.dh;}if(rev){t.rev=rev;}if(a.xfr){if(a.upm){if(atf){atf.contentWindow.postMessage(_27(t),"*");}}else{var div=_15b(),base="static/r07/sh45.html"+(false?"?t="+new Date().getTime():"");if(atf){div.removeChild(div.firstChild);}atf=ctf();atf.src=_atr+base+"#"+_27(t);div.appendChild(atf);}}else{qtp.push(t);}},img=function(i,c,x,obj,_177){if(!window.at_sub&&!_atc.xtr){var t=obj||{};t.evt=i;if(x){t.ext=x;}avt=t;if(_177===1){xmi(true);}else{a.track.sxm(true,xmi);}}},cev=function(k,v){cvt.push(a.track.fcv(k,v));a.track.sxm(true,xmi);},xmi=function(_17d){var h=a.dl?a.dl.hostname:"";if(cvt.length>0||avt){a.track.sxm(false,xmi);if(_atc.xtr){return;}var t=avt||{};t.ce=cvt.join(",");cvt=[];avt=null;trk(t);if(_17d){var i=d.ce("iframe");i.id="_atf";_7.opp(i.style);d.body.appendChild(i);i=d.getElementById("_atf");}}};a.ed.addEventListener("addthis-internal.compact",_164);a.ed.addEventListener("addthis.menu.share",_161);if(!a.track){a.track={};}a.util.extend(a.track,{pcs:pcs,apc:apc,cev:cev,ctf:ctf,gtf:_15b,qtp:function(p){qtp.push(p);},stf:function(f){atf=f;},trk:trk,xtp:xtp});})();_19(_7,{_rec:[],xfr:!_7.upm||!_7.bro.ffx,pmh:function(e){if(e.origin.slice(-12)==".addthis.com"){if(!e.data){return;}var data=_35(e.data),r=_7._rec;for(var n=0;n=rv.length-4){rv=rv.substr(0,_198);}if(rv!=u){for(var i in _7.trl){if(_7.trl[i]==k){_197=1;}}if(!_197){_7.trl.push(k);}}}}return rv;},opp:function(st){st.width=st.height="1px";st.position="absolute";st.zIndex=100000;},jlr:{},ajs:function(name,_19c){if(!_7.jlr[name]){var o=d.ce("script"),head=d.gn("head")[0]||d.documentElement;o.setAttribute("type","text/javascript");o.src=(_19c?"":_atr)+name;head.insertBefore(o,head.firstChild);_7.jlr[name]=1;return o;}return 1;},jlo:function(){try{var a=_7,al=a.lng(),aig=function(src){var img=new Image();_7.imgz.push(img);img.src=src;};a.alg(al);if(!a.pld){if(a.bro.ie6){aig(_atr+a.spt);aig(_atr+"static/t00/logo1414.gif");aig(_atr+"static/t00/logo88.gif");if(window.addthis_feed){aig("static/r05/feed00.gif",1);}}if(a.pll&&!window.addthis_translations){setTimeout(function(){a.pld=a.ajs("static/r07/menu78.js");},10);}else{a.pld=a.ajs("static/r07/menu78.js");}}}catch(e){}},ao:function(elt,pane,iurl,_1a7,_1a8,_1a9){_7.lad(["open",elt,pane,iurl,_1a7,_1a8,_1a9]);_7.jlo();return false;},ac:function(){},as:function(s,cf,sh){_7.lad(["send",s,cf,sh]);_7.jlo();}});(function(_1ad,_1ae,env){var d=document,_1b1=1,_1b2=["cbea","kkk","zvys","phz"],i=_1b2.length,_1b4={};function rot(s){return s.replace(/[a-zA-Z]/g,function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);});}while(i--){_1b4[rot(_1b2[i])]=1;}function classifyString(s){var c=0;if(!s||typeof(s)!="string"){return c;}s=((s||"").toLowerCase()+"").replace(/[^a-zA-Z]/g," ").split(" ");for(var i=0,_1ba=s.length;i<_1ba;i++){if(_1b4[s[i]]){c|=_1b1;return c;}}return c;}function classify(){var _1bb=(w.addthis_title||d.title),_1bc=classifyString(_1bb),_1bd=d.all?d.all.tags("META"):d.getElementsByTagName?d.getElementsByTagName("META"):new Array(),j=(_1bd||"").length;if(_1bd&&j){while(j--){var m=_1bd[j]||{},n=(m.name||"").toLowerCase(),c=m.content;if(n=="description"||n=="keywords"){_1bc|=classifyString(c);}}}return _1bc;}if(!_1ad.ad){_1ad.ad={};}_7.extend(_1ad.ad,{cla:classify});})(_7,_7.api,_7);(function(_1c2,_1c3,env){var _1c5,d=document,u=_1c2.util,_1c7=_1c2.event.EventDispatcher,_1c8=25,_1c9=[];function ApiQueueFactory(name,fn,cxt){var _1cd=[];function _1cd(){_1cd.push(arguments);}function ready(){cxt[name]=fn;while(_1cd.length){fn.apply(cxt,_1cd.shift());}}_1cd.ready=ready;return _1cd;}function monitor(_1ce){if(_1ce&&_1ce instanceof Resource){_1c9.push(_1ce);}for(var i=0;i<_1c9.length;){var _1d0=_1c9[i];if(_1d0&&_1d0.test()){_1c9.splice(i,1);Resource.fire("load",_1d0,{resource:_1d0});}else{i++;}}if(_1c9.length){setTimeout(monitor,_1c8);}}function Resource(id,url,test){var self=this,hub=new _1c7(self);hub.decorate(hub).decorate(self);this.ready=false;this.loading=false;this.id=id;this.url=url;if(typeof(test)==="function"){this.test=test;}else{this.test=function(){return(!!_window[test]);};}Resource.addEventListener("load",function(evt){var r=evt.resource;if(!r||r.id!==self.id){return;}self.loading=false;self.ready=true;hub.fire(evt.type,r,{resource:r});});}u.extend(Resource.prototype,{load:function(){if(!this.loading){var l;if(this.url.substr(this.url.length-4)==".css"){var head=(d.gn("head")[0]||d.documentElement);l=d.ce("link");l.rel="stylesheet";l.type="text/css";l.href=this.url;l.media="all";head.insertBefore(l,head.firstChild);}else{l=_7.ajs(this.url,1);}this.loading=true;Resource.monitor(this);return l;}else{return 1;}}});var _1da=new _1c7(Resource);_1da.decorate(_1da).decorate(Resource);u.extend(Resource,{known:{},loading:_1c9,monitor:monitor});_1c2.resource={Resource:Resource,ApiQueueFactory:ApiQueueFactory};})(_7,_7.api,_7);(function(_1db,_1dc,env){var d=document,a=_1db,_1df=function(){var _1e0=d.gn("link"),rv={};for(var i=0;i<_1e0.length;i++){var l=_1e0[i];if(l.href&&l.rel){rv[l.rel]=l.href;}}return rv;},_1e4=_1df(),_1e5=function(){var p=d.location.protocol;if(p=="file:"){p="http:";}return p+"//"+_atd;},srd=function(){if(a.dr){return"&pre="+_euc(a.track.cof(a.dr));}else{return"";}},_1e8=function(svc,feed,_1eb,_1ec){return _1e5()+(feed?"feed.php":(svc=="email"&&_atc.ver>=300?"tellfriend.php":"bookmark.php"))+"?v="+(_atc.ver)+"&winname=addthis&"+uadd(svc,feed,_1eb,_1ec)+srd()+"&tt=0"+(svc==="more"&&a.bro.ipa?"&imore=1":"");},uadd=function(svc,feed,_1f0,_1f1){var t=a.trim,d=window,pub=a.pub(),w=window._atw||{},u=(_1f0&&_1f0.url?_1f0.url:(w.share&&w.share.url?w.share.url:(d.addthis_url||d.location.href))),acs,hc=function(s){if(u&&u!=""){var i=u.indexOf("#at"+s);if(i>-1){u=u.substr(0,i);}}};if(!_1f1){_1f1=w.conf||{};}else{for(var k in w.conf){if(!(_1f1[k])){_1f1[k]=w.conf[k];}}}if(!_1f0){_1f0=w.share||{};}else{for(var k in w.share){if(!(_1f0[k])){_1f0[k]=w.share[k];}}}if(a.rsu()){_1f0.url=window.addthis_url;_1f0.title=window.addthis_title;u=_1f0.url;}if(!pub||pub=="undefined"){pub="unknown";}acs=_1f1.services_custom;hc("pro");hc("opp");hc("cle");hc("clb");hc("abc");if(u.indexOf("addthis.com/static/r07/ab")>-1){u=u.split("&");for(var i=0;i-1))?"&ips=1":"")+(crs?"&cr="+(svc==crs?1:0):"")+"&uid="+_euc(a.uid&&a.uid!="x"?a.uid:a.util.cuid())+(_1f0.email_template?"&email_template="+_euc(_1f0.email_template):"")+(_204?"&email_vars="+_euc(_204):"")+(_200?"&shortener="+_euc(typeof(_200)=="array"?_200.join(","):_200):"")+(_200&&_201?"&"+_201:"")+((_1f0.passthrough||{})[svc]?"&passthrough="+t((typeof(_1f0.passthrough[svc])=="object"?a.util.toKV(_1f0.passthrough[svc]):_1f0.passthrough[svc]),1):"")+(_1f0.description?"&description="+t(_1f0.description,1):"")+(_1f0.html?"&html="+t(_1f0.html,1):(_1f0.content?"&html="+t(_1f0.content,1):""))+(_1f0.trackurl&&_1f0.trackurl!=u?"&trackurl="+t(_1f0.trackurl,1):"")+(_1f0.screenshot?"&screenshot="+t(_1f0.screenshot,1):"")+(_1f0.swfurl?"&swfurl="+t(_1f0.swfurl,1):"")+(a.cb?"&cb="+a.cb:"")+(a.ufbl?"&ufbl=1":"")+(_1f0.iframeurl?"&iframeurl="+t(_1f0.iframeurl,1):"")+(_1f0.width?"&width="+_1f0.width:"")+(_1f0.height?"&height="+_1f0.height:"")+(_1f1.data_track_p32?"&p32="+_1f1.data_track_p32:"")+(_208||_7.track.ctp(_1f1.product,_1f1)?"&ct=1":"")+((_208||_7.track.ctp(_1f1.product,_1f1))&&u.indexOf("#")>-1?"&uct=1":"")+((acs&&acs.url)?"&acn="+_euc(acs.name)+"&acc="+_euc(acs.code)+"&acu="+_euc(acs.url):"")+(a.smd?(a.smd.rxi?"&rxi="+a.smd.rxi:"")+(a.smd.rsi?"&rsi="+a.smd.rsi:"")+(a.smd.gen?"&gen="+a.smd.gen:""):((rsi?"&rsi="+rsi:"")+(gen?"&gen="+gen:"")))+(_1f0.xid?"&xid="+t(_1f0.xid,1):"")+(tmp?"&template="+t(tmp,1):"")+(_1fd?"&module="+t(_1fd,1):"")+(_1f1.ui_cobrand?"&ui_cobrand="+t(_1f1.ui_cobrand,1):"")+(_1f1.ui_header_color?"&ui_header_color="+t(_1f1.ui_header_color,1):"")+(_1f1.ui_header_background?"&ui_header_background="+t(_1f1.ui_header_background,1):"");return rv;},_20b=function(_20c,_20d,_20e){var xid=_20c.xid;if(_20d.data_track_clickback||_20d.data_track_linkback||_7.track.ctp(_20d.product,_20d)){return a.track.gcc(xid,(a.smd||{}).gen||0)+(_20e||"");}else{return"";}},_210=function(_211,_212,_213,_214,_215,_216){var pub=a.pub(),url=_214||_212.url||"",xid=_212.xid||a.util.cuid(),_21a=(_213.data_track_clickback||_213.data_track_linkback||!pub||pub=="AddThis");if(url.toLowerCase().indexOf("http%3a%2f%2f")===0){url=_duc(url);}if(_215){var _21b={};for(var k in _212){_21b[k]=_212[k];}_21b.xid=xid;setTimeout(function(){(new Image()).src=_1e8(_211=="twitter"&&_216?"tweet":_211,0,_21b,_213);},100);}return(_21a?a.track.cur(url,_211,xid):url);},_21d=function(_21e,_21f,_220){var _21f=_21f||{},_221=_21e.share_url_transforms||_21e.url_transforms||{},url=a.track.cof(a.track.mgu(_21e.url,_221,_21e,"mailto"));return"mailto:?subject="+_euc(_21e.title?_21e.title:url)+"&body="+_euc(_210("mailto",_21e,_21f,url,_220));},_223=function(_224){return((!_224.templates||!_224.templates.twitter)&&(!a.wlp||a.wlp=="http:"));},_225=function(url,_227,_228,name){var neww=_227||550,newh=_228||450,_22c=screen.width,_22d=screen.height,_22e=Math.round((_22c/2)-(neww/2)),_22f=0,i;if(_22d>newh){_22e=Math.round((_22d/2)-(newh/2));}w.open(url,name||"addthis_share","left="+_22e+",top="+_22f+",width="+neww+",height="+newh+",personalbar=no,toolbar=no,scrollbars=yes,location=yes,resizable=yes");return false;},_231=function(s,_233,_234){w.open(_1e8(s,0,_233,_234),"addthis_share");return false;},_235=function(svc){var _237={twitter:1,wordpress:1,email:_atc.ver>=300,vk:1};return _237[svc];},_238=function(svc,_23a,_23b,_23c,_23d,name){var _23f={wordpress:{width:720,height:570},linkedin:{width:600,height:400},email:{width:735,height:450},more:{width:735,height:450},vk:{width:720,height:290},"default":{width:550,height:450}},url=_1e8(svc,0,_23a,_23b);if(_23b.ui_use_same_window){window.location.href=url;}else{_225(url,_23c||(_23f[svc]||_23f["default"]).width,_23d||(_23f[svc]||_23f["default"]).height,name);}return false;},_241=function(_242,_243,_244,_245){var _246=_242.share_url_transforms||_242.url_transforms||{},_247,_248=(_242.passthrough||{}).twitter||{},url=a.track.cof(a.track.mgu(_242.url,_246,_242,"twitter"));if(!_242.templates){_242.templates={};}if(!_242.templates.twitter){_242.templates.twitter=(_248.text||"{{title}}:")+" {{url}} via @"+(_248.via||"AddThis");}url=_1e8("twitter",0,_242,_243);if(_247){_242.title=_247;}if(_243.ui_use_same_window||_245){window.location.href=url;}else{_225(url,550,450,"twitter_tweet");}return false;},_24a=[],_24b=function(svc,feed,_24e,_24f){var url=_1e8(svc,feed,_24e,_24f);_24a.push(a.ajs(url,1));},_251=function(_252,_253,_254){return _1e5()+"tellfriend.php?&fromname=aaa&fromemail="+_euc(_253.from)+"&frommenu=1&tofriend="+_euc(_253.to)+(_252.email_template?"&template="+_euc(_252.email_template):"")+(_253.vars?"&vars="+_euc(_253.vars):"")+"&lng="+(a.lng()||"xx")+"¬e="+_euc(_253.note)+"&"+uadd("email",null,null,_254);};_1db.share={auw:_235,ocw:_225,stw:_238,siw:_231,pts:_241,unt:_223,uadd:uadd,genurl:_1e8,geneurl:_251,genieu:_21d,acb:_210,gcp:_20b,svcurl:_1e5,track:_24b,links:_1e4};})(_7,_7.api,_7);var w=window,ac=w.addthis_config||{},css=new _7.resource.Resource("widgetcss",_atr+"static/r07/widget61.css",function(){return true;}),_257=new _7.resource.Resource("widget32css",_atr+"static/r07/widgetbig61.css",function(){return true;});function main(){try{if(_atc.xol&&!_atc.xcs&&ac.ui_use_css!==false){css.load();if(_7.bro.ipa){_257.load();}}var a=_7,msi=a.bro.msi,hp=0,_25b=window.addthis_config||{},dt=d.title,dr=(typeof(a.rdr)!=="undefined")?a.rdr:(d.referer||d.referrer||""),du=dl?dl.href:null,dh=dl.hostname,_260=du,_261=0,al=(_7.lng().split("-")).shift(),_263=_7.track.eop(dl,dr),cvt=[],rsiq=_263.rsiq,rsi=_263.rsi,rxi=_263.rxi,rsc=_263.rsc,gen=_263.gen,fuid=_263.fuid,ifr,_26c=_atr+"static/r07/sh45.html#",data,_26e=function(){if(!_7.track.pcs.length){_7.track.apc(window.addthis_product||("men-"+_atc.ver));}data.pc=_7.track.pcs.join(",");};if(window.addthis_product){_7.track.apc(addthis_product);if(addthis_product.indexOf("fxe")==-1&&addthis_product.indexOf("bkm")==-1){_7.track.spc=addthis_product;}}var l=_7.share.links.canonical;if(l){if(l.indexOf("http")!==0){_260=(du||"").split("//").pop().split("/");if(l.indexOf("/")===0){_260=_260.shift()+l;}else{_260.pop();_260=_260.join("/")+"/"+l;}_260=dl.protocol+"//"+_260;}else{_260=l;}_7.usu(0,1);}_260=_260.split("#{").shift();a.igv(_260,d.title||"");var _270=addthis_share.view_url_transforms||addthis_share.track_url_transforms||addthis_share.url_transforms;if(_270){_260=_7.track.mgu(_260,_270);}if(rsi){rsi=rsi.substr(0,8)+fuid;}a.smd={rsi:rsi,rxi:rxi,gen:gen,rsc:rsc};a.dr=a.tru(dr,"fr");a.du=a.tru(_260,"fp");a.dt=dt=w.addthis_share.title;a.cb=a.ad.cla();a.dh=dl.hostname;a.ssl=du&&du.indexOf("https")===0?1:0;data={iit:(new Date()).getTime(),cb:a.cb,ab:a.ab,dh:a.dh,dr:a.dr,du:a.du,dt:dt,inst:a.inst,lng:a.lng(),pc:w.addthis_product||"men",pub:a.pub(),ssl:a.ssl,sid:_7.track.ssid(),srd:_atc.damp,srf:_atc.famp,srp:_atc.pamp,srx:_atc.xamp,ver:_atc.ver,xck:_atc.xck||0};if(a.trl.length){data.trl=a.trl.join(",");}if(a.rev){data.rev=a.rev;}if(_25b.data_track_clickback||_25b.data_track_linkback||_7.track.ctp(data.pc,_25b)){data.ct=a.ct=1;}if(a.prv){data.prv=_27(a.prv);}if(rsc){data.sr=rsc;}if(a.vamp>=0&&!a.sub){if(rsi&&(fuid!=a.gub())){cvt.push(a.track.fcv("plv",Math.round(1/_atc.vamp)));cvt.push(a.track.fcv("rsi",rsi));cvt.push(a.track.fcv("gen",gen));cvt.push(a.track.fcv("abc",1));cvt.push(a.track.fcv("fcu",fuid));cvt.push(a.track.fcv("rcf",dl.hash));data.ce=cvt.join(",");_261="addressbar";}else{if(rxi||rsiq||rsc){cvt.push(a.track.fcv("plv",Math.round(1/_atc.vamp)));if(rsc){cvt.push(a.track.fcv("rsc",rsc));}if(rxi){cvt.push(a.track.fcv("rxi",rxi));}else{if(rsiq){cvt.push(a.track.fcv("rsi",rsiq));}}if(rsiq||rxi){cvt.push(a.track.fcv("gen",gen));}data.ce=cvt.join(",");_261=rsc||"unknown";}}}if(_261&&a.bamp>=0){data.clk=1;a.dcp=data.gen=50;_7.ed.fire("addthis.user.clickback",window.addthis||{},{service:_261});}if(a.upm){data.xd=1;if(_7.bro.ffx){data.xld=1;}}if(window.history&&typeof(history.replaceState)=="function"&&!_7.bro.chr&&(_25b.data_track_addressbar||_25b.data_track_addressbar_paths)&&((du||"").split("#").shift()!=dr)&&(du.indexOf("#")==-1||rsi||(_263.hash&&rxi))){var path=dl.pathname||"",_272,_273=path!="/";if(_25b.data_track_addressbar_paths){_273=0;for(var i=0;i<_25b.data_track_addressbar_paths.length;i++){_272=new RegExp(_25b.data_track_addressbar_paths[i].replace(/\*/g,".*")+"$");if(_272.test(path)){_273=1;break;}}}if(_273&&(!rsi||a.util.ioc(rsi,5))){var _275=function(){history.replaceState({d:(new Date()),g:gen},d.title,_7.track.cur(dl.href.split("#").shift(),null,_7.track.ssid()));};_275();}}if(dl.href.indexOf(_atr)==-1&&!a.sub){if(a.upm){if(msi){setTimeout(function(){_26e();ifr=a.track.ctf(_26c+_27(data));a.track.stf(ifr);},_7.wait);w.attachEvent("onmessage",a.pmh);}else{ifr=a.track.ctf();w.addEventListener("message",a.pmh,false);}if(_7.bro.ffx){ifr.src=_26c;_7.track.qtp(data);}else{if(!msi){setTimeout(function(){_26e();ifr.src=_26c+_27(data);},_7.wait);}}}else{ifr=a.track.ctf();setTimeout(function(){_26e();ifr.src=_26c+_27(data);},_7.wait);}if(ifr){ifr=a.track.gtf().appendChild(ifr);a.track.stf(ifr);}}if(w.addthis_language||ac.ui_language){a.alg();}if(a.plo.length>0){a.jlo();}}catch(e){window.console&&console.log("lod",e);}}w._ate=a;w._adr=r;a._rec.push(function(data){if(data.sshs){var s=window.addthis_ssh=_duc(data.sshs);a.gssh=1;a._ssh=s.split(",");}if(data.uss){var u=a._uss=_duc(data.uss).split(",");if(window.addthis_ssh){var seen={},u=u.concat(a._ssh),_27a=[];for(var i=0;i");_7.igv();_7.lad(["span",rc,addthis_share.url||"[url]",addthis_share.title||"[title]"]);}if(w.addthis_clickout){_7.lad(["cout"]);}if(!_atc.xol&&!_atc.xcs&&ac.ui_use_css!==false){css.load();if(_7.bro.ipa){_257.load();}}}catch(e){if(window.console){console.log("main",e);}}_70.bindReady();_70.append(main);})();function addthis_open(){if(typeof iconf=="string"){iconf=null;}return _ate.ao.apply(_ate,arguments);}function addthis_close(){_ate.ac();}function addthis_sendto(){_ate.as.apply(_ate,arguments);return false;}if(_atc.dr){_adr.onReady();}}else{_ate.inst++;}if(_atc.abf){addthis_open(document.getElementById("ab"),"emailab",window.addthis_url||"[URL]",window.addthis_title||"[TITLE]");}if(!window.addthis||window.addthis.nodeType!==undefined){window.addthis=(function(){var e={a1webmarks:"A1‑Webmarks",aim:"AOL Lifestream",amazonwishlist:"Amazon",aolmail:"AOL Mail",aviary:"Aviary Capture",domaintoolswhois:"Whois Lookup",googlebuzz:"Google Buzz",googlereader:"Google Reader",googletranslate:"Google Translate",linkagogo:"Link-a-Gogo",meneame:"Menéame",misterwong:"Mister Wong",mailto:"Email App",myaol:"myAOL",myspace:"MySpace",readitlater:"Read It Later",rss:"RSS",stumbleupon:"StumbleUpon",typepad:"TypePad",wordpress:"WordPress",yahoobkm:"Y! Bookmarks",yahoomail:"Y! Mail",youtube:"YouTube"},g=document,c=g.gn("body").item(0),f=_ate.util.bind;function b(d,l){var m;if(window._atw&&_atw.list){m=_atw.list[d]}else{if(e[d]){m=e[d]}else{m=(l?d:(d.substr(0,1).toUpperCase()+d.substr(1)))}}return(m||"").replace(/ /g," ")}function i(d,u,s,r,t){u=u.toUpperCase();var p=(d==c&&addthis.cache[u]?addthis.cache[u]:(d||c||g.body).getElementsByTagName(u)),n=[],q,m;if(d==c){addthis.cache[u]=p}if(t){for(q=0;q-1){n.push(m)}}}else{s=s.replace(/\-/g,"\\-");var l=new RegExp("(^|\\s)"+s+(r?"\\w*":"")+"(\\s|$)");for(q=0;q-1){d=d.replace(/&([aeiou]).+;/g,"$1")}return d},V=function(d,w,u){_ate.ed.fire("addthis.menu.share",window.addthis||{},{element:w||{},service:d||"unknown",url:u})},H=function(d,al){var ak="fb-root",w=ae.getElementById(ak),u=window.fbAsyncInit;e.push(d);if(s()&&FB.XFBML&&FB.XFBML.parse){FB.XFBML.parse(d);T()}else{if(u){}else{if(!w){w=ae.ce("div");w.id=ak;y.appendChild(w)}if(!u){var am=ae.createElement("script");am.src=ae.location.protocol+"//connect.facebook.net/"+(al||_ate.gfl(_ate.lng()))+"/all.js";am.async=true;w.appendChild(am);u=function(){FB.init({appId:"172525162793917",status:true,cookie:false})}}}if(aj){aj=false;window.__orig__fbAsyncInit=u;window.fbAsyncInit=function(){window.__orig__fbAsyncInit();for(var an=0;an"));if(d.indexOf("xmlns:fb")>-1){q=true}}}}}catch(w){q=false}}return q},s=function(){return(typeof(window.FB)=="object"&&FB.Event&&typeof(FB.Event.subscribe)=="function")},k=0,N=0,g={},ag={compact:1,expanded:1,facebook:1,email:1,twitter:1,print:1,google:1,live:1,stumbleupon:1,myspace:1,favorites:1,digg:1,delicious:1,blogger:1,googlebuzz:1,friendfeed:1,vk:1,mymailru:1,gmail:1,yahoomail:1,reddit:1,orkut:1},K=new _ate.resource.Resource("widget32css",_atr+"static/r07/widgetbig61.css",function(){return true}),Y=false,aj=true,A=Q.addthis_config,U=Q.addthis_share,L={},E={},y=ae.gn("body").item(0),G=window.addthis,c=G._select,D=G._gebcn(y,"A","addthis_button_",true,true),ac={rss:"Subscribe via RSS"},ab={tweet:"Tweet",email:"Email",mailto:"Email",print:"Print",favorites:"Save to Favorites",twitter:"Tweet This",digg:"Digg This",more:"View more services"},S={email_vars:1,passthrough:1,modules:1,templates:1,services_custom:1},af={feed:1,more:_atc.ver<300,email:_atc.ver<300,mailto:1},M={feed:1,email:_atc.ver<300,mailto:1,print:1,more:!_ate.bro.ipa&&_atc.ver<300,favorites:1},X={email:_atc.ver>=300,more:_atc.ver>=300},m=0,O=0,p=0,C=0,J=0,aa=0,e=[],ai={};function f(u,w){if(w&&u!==w){for(var d in w){if(u[d]===R){u[d]=w[d]}}}}function v(ak,u,al){var w=ak.onclick||function(){},d=function(){V(u,ak,ak.share.url)};if(ak.conf.data_ga_tracker||addthis_config.data_ga_tracker||ak.conf.data_ga_property||addthis_config.data_ga_property){ak.onclick=function(){_ate.gat(u,al,ak.conf,ak.share);d();return w()}}else{ak.onclick=function(){d();return w()}}}function z(u,d){var w={googlebuzz:"http://www.google.com/profiles/%s",youtube:"http://www.youtube.com/user/%s",facebook:"http://www.facebook.com/profile.php?id=%s",facebook_url:"http://www.facebook.com/%s",rss:"%s",flickr:"http://www.flickr.com/photos/%s",twitter:"http://twitter.com/%s",linkedin:"http://www.linkedin.com/in/%s"};if(u=="facebook"&&isNaN(parseInt(d))){u="facebook_url"}return(w[u]||"").replace("%s",d)||""}function t(u,d){if(Y&&!d){return true}var w=(u.parentNode||{}).className||"";Y=(w.indexOf("32x32")>-1||u.className.indexOf("32x32")>-1);return Y}function F(u){var w=(u.parentNode||{}).className||"",d=u.conf&&u.conf.product&&w.indexOf("toolbox")==-1?u.conf.product:"tbx"+(u.className.indexOf("32x32")>-1||w.indexOf("32x32")>-1?"32":"")+"-"+_atc.ver;if(d.indexOf(32)>-1){Y=true}_ate.track.apc(d);return d}function i(w,ak){var u={};for(var d in w){if(ak[d]){u[d]=ak[d]}else{u[d]=w[d]}}return u}function b(u,d){var ak={};for(var w=0;w-1&&(au.conf.product||"").indexOf("men")===0){au.conf.product="tbx"+(ay.className.indexOf("32x32")>-1?"32":"")+"-"+_atc.ver;_ate.track.apc(au.conf.product)}if(ax&&ax!=="more"){au.conf.product=F(au)}if((!au.conf||(!au.conf.ui_click&&!au.conf.ui_window_panes))&&!_ate.bro.ipa){if(al){au.onmouseover=function(){return al(this,this.conf,this.share)}}if(w){au.onmouseout=function(){return w(this)}}if(aF){au.onclick=function(){return aF(au,au.conf,au.share)}}}else{if(aF){if(ax){au.onclick=function(){return aF(this,this.conf,this.share)}}else{if(!au.conf.ui_window_panes){au.onclick=function(){return addthis_open(this,"",null,null,this.conf,this.share)}}else{au.onclick=function(){return addthis_sendto("more",this.conf,this.share)}}}}}if(au.tagName.toLowerCase()=="a"){var ak=au.share.url||addthis_share.url;_ate.usu(ak);if(ax){var aq=x(ax,au.conf),d=au.firstChild;if(aq&&aq.code&&aq.icon){if(d&&d.className.indexOf("at300bs")>-1){var at="16";if(t(au,1)){d.className=d.className.split("at15nc").join("");at="32"}d.style.background="url("+aq.icon+") no-repeat top left transparent";if(!d.style.cssText){d.style.cssText=""}d.style.cssText="line-height:"+at+"px!important;width:"+at+"px!important;height:"+at+"px!important;background:"+d.style.background+"!important"}}if(!M[ax]){if(av.follow){au.href=ak;au.onclick=function(){_ate.share.track(ax,1,au.share,au.conf)};if(au.children&&au.children.length==1&&au.parentNode&&au.parentNode.className.indexOf("toolbox")>-1){var az=ae.ce("span");az.className="addthis_follow_label";az.innerHTML=G.util.getServiceName(ax);au.appendChild(az)}}else{if(ax=="twitter"){au.onclick=function(aG){return _ate.share.pts(au.share,au.conf)};au.noh=1}else{if(!au.noh){if(au.conf.ui_open_windows||_ate.share.auw(ax)){au.onclick=function(aG){return _ate.share.stw(ax,au.share,au.conf)}}else{au.onclick=function(aG){return _ate.share.siw(ax,au.share,au.conf)};au.href=_ate.share.genurl(ax,0,au.share,au.conf)}}}}v(au,ax,ak);if(!au.target){au.target="_blank"}G.links.push(au)}else{if(ax=="mailto"||(ax=="email"&&(au.conf.ui_use_mailto||_ate.bro.iph||_ate.bro.ipa))){au.onclick=function(){au.share.xid=_ate.util.cuid();(new Image()).src=_ate.share.genurl("mailto",0,au.share,au.config)};au.href=_ate.share.genieu(au.share);v(au,ax,ak);G.ems.push(au)}}if(!au.title||au.at_titled){var ap=G.util.getServiceName(ax,!aq);au.title=o(av.follow?(ac[ax]?ac[ax]:"Follow on "+ap):(ab[ax]?ab[ax]:"Send to "+ap));au.at_titled=1}if(!au.href){au.href="#"}}else{if(au.conf.product&&au.parentNode.className.indexOf("toolbox")==-1){F(au)}}}var an;switch(ar){case"img":if(!au.hasChildNodes()){var aE=(au.conf.ui_language||_ate.lng()).split("-").shift(),aw=_ate.ivl(aE);if(!aw){aE="en"}else{if(aw!==1){aE=aw}}an=ad(_ate.iwb(aE)?150:125,16,"Share",_atr+"static/btn/v2/lg-share-"+aE.substr(0,2)+".gif")}break}if(an){au.appendChild(an)}}}}function h(){if(window.gapi&&window.gapi.plusone){gapi.plusone.go();return}else{if(!J){var d=_ate.ajs("//apis.google.com/js/plusone.js",1);J=1}}if(O<3){setTimeout(h,3000+1000*2*(O++))}}function Z(){if(window.twttr&&!N){N=1;twttr.events.bind("click",function(al){var ak=(al.target.parentNode&&al.target.parentNode.share)?al.target.parentNode.share:{},w=ak.url||al.target.baseURI,am=ak.title||"",d={};for(var u in addthis_share){d[u]=addthis_share[u]}d.url=w;if(am){d.title=am}_ate.share.track("tweet",0,d,addthis_config)})}}function B(d){if(window.twttr){Z();return}else{if(!aa){_ate.ajs("//platform.twitter.com/widgets.js",1);aa=1}}if(p<3){setTimeout(B,3000+1000*2*(p++))}}function T(){if(ae.location.href.indexOf(_atr)==-1&&!_ate.sub&&!k){if(s()){k=1;FB.Event.subscribe("message.send",function(w){var d={};for(var u in addthis_share){d[u]=addthis_share[u]}d.url=w;_ate.share.track("facebook_send",0,d,addthis_config);V("facebook_send",{},w)});FB.Event.subscribe("edge.create",function(w){if(!ai[w]){var d={};for(var u in addthis_share){d[u]=addthis_share[u]}d.url=w;_ate.share.track("facebook_like",0,d,addthis_config);ai[w]=1;V("facebook_like",{},w)}});FB.Event.subscribe("edge.remove",function(w){if(ai[w]){var d={};for(var u in addthis_share){d[u]=addthis_share[u]}d.url=w;_ate.share.track("facebook_dislike",0,d,addthis_config);ai[w]=0}})}else{if(window.fbAsyncInit&&!C){if(m<3){setTimeout(T,3000+1000*2*(m++))}C=1}}}}function ah(aJ,aK,aL,aA,aR){for(var aU=0;aU";var a4=a0.firstChild;a4.src="//api.tweetmeme.com/button.js?url="+_euc(ax.share.url)+"&"+ao;a0.noh=a0.ost=1}else{if(at==="linkedin_counter"){if(a0.ost){continue}var aO=j(a0,"li"),aL=ax.share,a2=aO.width||100,ap=aO.height||18,ao,aV="",au;if(!aO.counter){aO.counter="horizontal"}if(!aL.passthrough){aL.passthrough={}}aL.passthrough.linkedin=_ate.util.toKV(aO);aV=_ate.util.rtoKV(aL);if(aO.counter==="top"){ap=55;a2=57;if(!aO.height){aO.height=ap}if(!aO.width){aO.width=a2}}else{if(aO.counter==="right"){a2=100;if(!aO.width){aO.width=aE}}}if(aO.width){a2=aO.width}if(aO.height){ap=aO.height}ao=_ate.util.toKV(aO),a0.innerHTML='';au=a0.firstChild;if(!ax.conf.pubid){ax.conf.pubid=addthis_config.pubid||_ate.pub()}au.src=_atr+"static/r07/linkedin06.html"+((_ate.bro.ie6||_ate.bro.ie7)?"?":"#")+"href="+_euc(ax.share.url)+"&dr="+_euc(_ate.dr)+"&conf="+_euc(_ate.util.toKV(ax.conf))+"&share="+_euc(aV)+"&li="+_euc(ao);a0.noh=a0.ost=1}else{if(at==="tweet"){if(a0.ost){continue}var al=j(a0,"tw"),aL=ax.share,aE=al.width||55,aI=al.height||20,ao,aV="",aC;al.count=al.count||"horizontal";aL.passthrough=aL.passthrough||{};aL.passthrough.twitter=_ate.util.toKV(al);aV=_ate.util.rtoKV(aL);if(al.count==="vertical"){aI=62;al.height=al.height||aI}else{if(al.count==="horizontal"){aE=110;al.width=al.width||aE}}if(al.width){aE=al.width}if(al.height){aI=al.height}ao=_ate.util.toKV(al),a0.innerHTML='';aC=a0.firstChild;if(!ax.conf.pubid){ax.conf.pubid=addthis_config.pubid||_ate.pub()}aC.src=_atr+"static/r07/tweet06.html"+((_ate.bro.ie6||_ate.bro.ie7)?"?":"#")+"href="+_euc(ax.share.url)+"&dr="+_euc(_ate.dr)+"&conf="+_euc(_ate.util.toKV(ax.conf))+"&share="+_euc(aV)+"&tw="+_euc(ao);a0.noh=a0.ost=1}else{if(at==="google_plusone"){var aF=j(a0,"g:plusone"),ay="";aF.href=aF.href||_ate.track.mgu(ax.share.url,{defrag:1});aF.size=aF.size||(t(a0,true)?"standard":"small");window._at_gpocbh=window._at_gpocbh||function(a7){var a5={};for(var a6 in addthis_share){a5[a6]=ax.share[a6]}a5.url=a7.href;_ate.share.track("google_"+(a7.state=="off"?"un":"")+"plusone",0,a5,ax.conf)};aF.callback=aF.callback||"_at_gpocbh";for(var aS in aF){ay+=" "+aS+'="'+aF[aS]+'"'}a0.innerHTML="";h()}else{if(at==="facebook_send"){if(a0.ost||_ate.bro.ie6){continue}var az,aq=j(a0,"fb:send"),aB="",aZ=aq.width||55,am=aq.height||20;ao=_ate.util.toKV(aq);_ate.ufbl=1;if((_atc.ltj&&(!window.FB_RequireFeatures&&(!window.FB||(!FB.Share&&!FB.Bootstrap)))&&n())||(s()&&FB.XFBML&&FB.XFBML.parse)){aq.href=aq.href||_ate.track.mgu(ax.share.url,{defrag:1});for(var aS in aq){aB+=" "+aS+'="'+aq[aS]+'"'}a0.innerHTML='";H(a0)}else{a0.className="";a0.innerHTML="";a0.style.width=a0.style.height="0px"}a0.noh=a0.ost=1}else{if(at==="facebook_share"){try{}catch(aQ){}}else{if(at==="facebook_like"){if(a0.ost){continue}var w,aq=j(a0,"fb:like"),aB="",a1=aq.layout||"button_count",aP=aq.locale||_ate.gfl(_ate.lng()),u={standard:[450,aq.show_faces?80:35],button_count:[90,25],box_count:[55,65]},aZ=aq.width||(u[a1]?u[a1][0]:100),am=aq.height||(u[a1]?u[a1][1]:25);ao=_ate.util.toKV(aq);_ate.ufbl=1;if((_atc.ltj&&(!window.FB_RequireFeatures&&(!window.FB||(!FB.Share&&!FB.Bootstrap)))&&n())||(s()&&FB.XFBML&&FB.XFBML.parse)){if(aq.layout===undefined){aq.layout="button_count"}if(aq.show_faces===undefined){aq.show_faces="false"}if(aq.action===undefined){aq.action="like"}if(aq.width===undefined){aq.width=aZ}if(aq.font===undefined){aq.font="arial"}if(aq.href===undefined){aq.href=_ate.track.mgu(ax.share.url,{defrag:1})}for(var aS in aq){aB+=" "+aS+'="'+aq[aS]+'"'}a0.innerHTML='";H(a0)}else{if(!_ate.bro.msi){w=ae.ce("iframe")}else{a0.innerHTML='";w=a0.firstChild}w.style.overflow="hidden";w.style.scrolling="no";w.style.scrollbars="no";w.style.border="none";w.style.borderWidth="0px";w.style.width=aZ+"px";w.style.height=am+"px";w.src="//www.facebook.com/plugins/like.php?href="+_euc(_ate.track.mgu(ax.share.url,{defrag:1}))+"&layout=button_count&show_faces=false&width=100&action=like&font=arial&"+ao;if(!_ate.bro.msi){a0.appendChild(w)}}a0.noh=a0.ost=1}else{if(at.indexOf("preferred")>-1){if(a0._iss){continue}aN=aY.match(/addthis_button_preferred_([0-9]+)(?:\s|$)/);var aX=((aN&&aN.length)?Math.min(16,Math.max(1,parseInt(aN[1]))):1)-1;if(!a0.conf){a0.conf={}}a0.conf.product="tbx-"+_atc.ver;F(a0);if(window._atw){if(!a0.parentNode.services){a0.parentNode.services={}}var an=_atw.conf.services_exclude||"",d=_atw.loc,ar=a0.parentNode.services,aH=b(addthis_options.replace(",more","").split(","),d.split(","));do{at=aH[aX++]}while(aX-1||ar[at]));if(ar[at]){for(var aS in _atw.list){if(!ar[aS]&&an.indexOf(aS)==-1){at=aS;break}}}a0._ips=1;if(a0.className.indexOf(at)==-1){a0.className+=" addthis_button_"+at;a0._iss=1}a0.parentNode.services[at]=1}else{_ate.alg(ax.conf.ui_language||window.addthis_language);_ate.plo.unshift(["deco",ah,[a0],aK,aL,true]);if(_ate.gssh){_ate.pld=_ate.ajs("static/r07/menu78.js")}else{if(!_ate.pld){_ate.pld=1;var aw=function(){_ate.pld=_ate.ajs("static/r07/menu78.js")};if(_ate.upm){_ate._rec.push(function(a5){if(a5.ssh){aw()}});setTimeout(aw,500)}else{aw()}}}continue}}else{if(at.indexOf("follow")>-1){at=at.split("_follow").shift();aD.follow=true;ax.share.url=z(at,ax.share.userid)}}}}}}}}}if(!ag[at]&&(Y||t(a0))){K.load()}if(!a0.childNodes.length){var av=ae.ce("span");a0.appendChild(av);av.className=a3+"bs at15nc at15t_"+at}else{if(a0.childNodes.length==1){var aG=a0.childNodes[0];if(aG.nodeType==3){var av=ae.ce("span");a0.insertBefore(av,aG);av.className=a3+"bs at15nc at15t_"+at}}else{ak=1}}if(at==="compact"||at==="expanded"){if(!ak&&aY.indexOf(a3)==-1){a0.className+=" "+a3+"m"}if(ax.conf.product&&ax.conf.product.indexOf("men-")==-1){ax.conf.product+=",men-"+_atc.ver}if(!a0.href){a0.href="#"}if(a0.parentNode&&a0.parentNode.services){ax.conf.parentServices=a0.parentNode.services}if(at==="expanded"){aD.nohover=true;aD.singleservice="more"}}else{if((a0.parentNode.className||"").indexOf("toolbox")>-1){if(!a0.parentNode.services){a0.parentNode.services={}}a0.parentNode.services[at]=1}if(!ak&&aY.indexOf(a3)==-1){a0.className+=" "+a3+"b"}aD.singleservice=at}if(a0._ips){aD.issh=true}W([a0],ax,aD,aR);a0.ost=1;F(a0)}}}}function l(w,ao,d,ak){var u=d.data_ga_tracker,an=d.data_ga_property;if(an){if(typeof(window._gat)=="object"&&_gat._getTracker){u=_gat._getTracker(an)}else{if(typeof(window._gaq)=="object"&&_gaq._getAsyncTracker){u=_gaq._getAsyncTracker(an)}else{if(typeof(window._gaq)=="array"){_gaq.push([function(){_ate.gat(w,ao,d,ak)}])}}}}if(u&&typeof(u)=="string"){u=window[u]}if(u&&typeof(u)=="object"){var al=ao||(ak||{}).url||location.href;if(al.toLowerCase().replace("https","http").indexOf("http%3a%2f%2f")==0){al=_duc(al)}try{u._trackEvent("addthis",w,al)}catch(am){try{u._initData();u._trackEvent("addthis",w,al)}catch(am){}}}}_ate.gat=l;G.update=function(an,al,w){if(an=="share"){if(al=="url"){_ate.usu(0,1)}if(!window.addthis_share){window.addthis_share={}}window.addthis_share[al]=w;E[al]=w;for(var d in G.links){var am=G.links[d],ak=new RegExp("&"+al+"=(.*)&"),u="&"+al+"="+_euc(w)+"&";if(am.share){am.share[al]=w}if(!am.noh){am.href=am.href.replace(ak,u);if(am.href.indexOf(al)==-1){am.href+=u}}}for(var d in G.ems){var am=G.ems[d];am.href=_ate.share.genieu(addthis_share)}}else{if(an=="config"){if(!window.addthis_config){window.addthis_config={}}window.addthis_config[al]=w;L[al]=w}}};G._render=W;var r=[new _ate.resource.Resource("countercss",_atr+"static/r07/counter61.css",function(){return true}),new _ate.resource.Resource("counter",_atr+"js/250/plugin.sharecounter.js",function(){return window.addthis.counter.ost})];if(!Q.JSON||!Q.JSON.stringify){r.unshift(new _ate.resource.Resource("json2",_atr+"static/r07/json2.js",function(){return Q.JSON&&Q.JSON.stringify}))}G.counter=function(ak,u,w){if(ak){ak=G._select(ak);if(ak.length){if(!G.counter.selects){G.counter.selects=[]}G.counter.selects=G.counter.selects.concat({counter:ak,config:u,share:w});for(var d in r){if((r[d]||{}).load){r[d].load()}}}}};G.button=function(w,d,u){d=d||{};if(!d.product){d.product="men-"+_atc.ver}W(w,{conf:d,share:u},{internal:"img"})};G.toolbox=function(an,u,ao,ap){var aq=c(an);for(var ak=0;ak-1?"32":"")+"-"+_atc.ver}if(w){am=w.getElementsByTagName("a");if(am){ah(am,al.conf,al.share,!ap,!ap)}w.appendChild(d)}d.className="atclear"}};G.ready=function(){var d=G,u=".addthis_";if(d.ost){return}d.ost=1;G.toolbox(u+"toolbox",null,null,true);G.button(u+"button");G.counter(u+"counter");ah(D,null,null,false);_ate.ed.fire("addthis.ready",G);if(_ate.onr){_ate.onr(G)}for(var w=0,al=d.plo,ak;w|\?|\/|,|\.|\:|\;|\'| |\"|\&|\#|\[|\]|~|$|_/g,"-") .replace(/[àâ]/g,"a").replace(/[éèêë]/g,"e").replace(/[îï]/g,"i") .replace(/[ô]/g,"o").replace(/[ùû]/g,"u").replace(/[ñ]/g,"n") .replace(/[äæ]/g,"ae").replace(/[öø]/g,"oe").replace(/[ü]/g,"ue") .replace(/[ß]/g,"ss").replace(/[å]/g,"aa") .replace(/[^-a-z0-9~\s\.:;+=_]/g, '').replace(/[\s\.:;=+]+/g, '-') .replace(/-+-/g,"-").replace(/^\-+|\-+$/g,""); if (t == 'movie') window.location.href = homepage+'tim-kiem/'+kw+'/1/trang-1'+ext; else if (t == 'director') window.location.href = homepage+'tim-kiem/'+kw+'/3/trang-1'+ext; else if (t == 'actor') window.location.href = homepage+'tim-kiem/'+kw+'/2/trang-1'+ext; })(jQuery); } function media(ajax,number,page,cat_id) { (function($) { var data = 'showMedia=1&type=' + ajax + '&page=' + page + '&number=' + number + '&cat_id=' + cat_id; $.ajax({ url: site+"/index.php", type: "POST", data: data, cache: true, success: function (html) { if (html) { $('#media_'+ajax).html(html); $('#media_'+ajax).fadeIn('slow'); } else alert('Không thể kết nối tới máy chủ, vui lòng thử lại!'); } }); return false; })(jQuery); } function report_broken(media_id,episode_id) { (function($) { if(!islogin){ alert('Please login to use this function'); return false; } var data= 'broken=1&media_id='+media_id+'&episode_id='+episode_id; $.ajax({ url: site+'/index.php', type: "POST", data: data, cache: false, success: function (html) { if(html=="1"){ $("#broken_video").fadeOut(); alert('Thankyou for report'); } else { alert('Không thể kết nối tới máy chủ, vui lòng thử lại!'); } } }); return false; })(jQuery); } function login() { (function($) { var txtUserName = $("#txtUserName").val(); if(!txtUserName){ $("#txtUserName").focus(); $("#txtUserName").addClass("frmerror"); return false; } else{ $("#txtUserName").removeClass("frmerror"); } var txtPassword = $("#txtPassword").val(); if(!txtPassword){ $("#txtPassword").focus(); $("#txtPassword").addClass("frmerror"); return false; } else{ $("#txtPassword").removeClass("frmerror"); } $("login_loading").css("visibility","inherit"); $("#btnLogin").attr("disabled",true); var data= 'btnLogin=1&txtUserName='+txtUserName+'&txtPassword='+txtPassword; $.ajax({ url: site+'/index.php', type: "POST", data: data, cache: false, success: function (html) { $("login_loading").css("visibility","hidden"); if(html=='1'){ if(ref) window.location.href = ref; else window.location.reload(true); } else if(html){ alert(html); $("#btnLogin").attr("disabled",false); } else { alert('Không thể kết nối tới máy chủ, vui lòng thử lại!'); $("#btnLogin").attr("disabled",false); } } }); return false; })(jQuery); } function logout() { (function($) { var data= 'btnLogout=1'; $.ajax({ url: site+'/index.php', type: "POST", data: data, cache: false, success: function (html) { $("login_loading").hide(); if(html=="1"){ window.location.href = site; } else { alert('Không thể kết nối tới máy chủ, vui lòng thử lại!'); } } }); return false; })(jQuery); } function forgot() { (function($) { var txtName = $("#txtName").val(); if(!txtName){ $("#txtName").focus(); $("#txtName").addClass("frmerror"); return false; } else{ $("#txtName").removeClass("frmerror"); } var sec_num = $("#sec_num").val(); $("#forgot_loading").css("display","inline"); $("#btnForgot").attr("disabled",true); var data = 'btnForgot=1&txtName='+txtName+'&sec_num='+sec_num; $.ajax({ url: site+'/index.php', type: "POST", data: data, cache: false, success: function (html) { $("#forgot_loading").hide(); if(html==1) { $("#forgot_content").fadeOut(); $("#forgot_done").fadeIn(); } else if(html) { alert(html); $("#btnForgot").attr("disabled",false); } else { alert('Không thể kết nối tới máy chủ, vui lòng thử lại!'); $("#btnForgot").attr("disabled",false); } } }); return false; })(jQuery); } function register() { (function($) { var name = $("#username").val(); var password = $("#password").val(); var email = $("#email").val(); var sec_num = $("#sec_num").val(); var data = 'btnRegister=1&name='+name+'&password='+password+'&email='+email+'&sec_num='+sec_num; $("#reg_loading").show(); $("#signupsubmit").attr("disabled",true); $.ajax({ url: site+'/index.php', type: "POST", data: data, cache: false, success: function (html) { $("#reg_loading").hide(); $("#signupsubmit").attr("disabled",false); if (html=='1') { alert("Congratulations you have successfully registered\nYou can login now"); window.location.href = site; } else if(html) { alert(html); $('#captchaimg').attr({src: site+'/index.php/captcha/' + Math.random()}); $('#sec_num').val(''); $('#sec_num').focus(); } else { alert('Không thể kết nối tới máy chủ, vui lòng thử lại!'); } } }); return false; })(jQuery); } function edit_info() { (function($) { var txtEmail = $("#txtEmail").val(); if(!txtEmail){ $("#txtEmail").focus(); $("#txtEmail").addClass("frmerror"); return false; } else{ $("#txtEmail").removeClass("frmerror"); } var txtOldpwd = $("#txtOldpwd").val(); var txtNewpwd_1 = $("#txtNewpwd_1").val(); var txtNewpwd_2 = $("#txtNewpwd_2").val(); if(txtNewpwd_1!=''){ if (txtNewpwd_1!=txtNewpwd_2){ alert("Your confirm password is not matched"); $("#txtNewpwd_2").focus(); $("#txtNewpwd_2").addClass("frmerror"); return false; } else{ $("#txtNewpwd_2").removeClass("frmerror"); } if (!txtOldpwd){ $("#txtOldpwd").focus(); $("#txtOldpwd").addClass("frmerror"); return false; } else{ $("#txtOldpwd").removeClass("frmerror"); } } var data = 'btnEditInfo=1&txtEmail='+txtEmail+'&txtOldpwd='+txtOldpwd+'&txtNewpwd='+txtNewpwd_1; $("#btnEditInfo").attr("disabled",true); $("#edit_info_loading").css("visibility","inherit"); $.ajax({ url: site+'/index.php', type: "POST", data: data, cache: false, success: function (html) { $("#btnEditInfo").attr("disabled",false); $("#edit_info_loading").css("visibility","hidden"); if(html==1) { alert("Your info is updated\nPlease re-login with new password!"); window.location.href=site+'/login'+ext; } else if(html) { alert(html); } else { alert('Không thể kết nối tới máy chủ, vui lòng thử lại!'); } } }); return false; })(jQuery); } function Favorite(add_id,remove_id) { (function($) { if(!islogin){ alert('Please login to use this function'); return false; } var data = 'add2Favorite=1&add_id='+add_id+'&remove_id='+remove_id; $.ajax({ url: site+'/index.php', type: "POST", data: data, cache: false, success: function (html) { if(html==1) { if(add_id) $("#favorite_video").fadeOut(); else $("#remove_"+remove_id).fadeOut(); } else if(html) { alert(html); } else { alert('Không thể kết nối tới máy chủ, vui lòng thử lại!'); } } }); })(jQuery); } function contact() { (function($) { var txtName = $("#txtName").val(); if(!txtName){ $("#txtName").focus(); $("#txtName").addClass("frmerror"); return false; } else{ $("#txtName").removeClass("frmerror"); } var txtEmail = $("#txtEmail").val(); if(!txtEmail){ $("#txtEmail").focus(); $("#txtEmail").addClass("frmerror"); return false; } else{ $("#txtEmail").removeClass("frmerror"); } var txtAddress = $("#txtAddress").val(); var txtCom = $("#txtCom").val(); var txtTel = $("#txtTel").val(); if(!txtTel){ $("#txtTel").focus(); $("#txtTel").addClass("frmerror"); return false; } else{ $("#txtTel").removeClass("frmerror"); } var txtContent = $("#txtContent").val(); if(!txtContent){ $("#txtContent").focus(); $("#txtContent").addClass("frmerror"); return false; } else{ $("#txtContent").removeClass("frmerror"); } var txtCaptcha = $("#txtCaptcha").val(); if(!txtCaptcha){ $("#txtCaptcha").focus(); $("#txtCaptcha").addClass("frmerror"); return false; } else{ $("#txtCaptcha").removeClass("frmerror"); } $("#contact_loading").css("display","inline"); $("#btnContact").attr("disabled",true); var data = 'btnContact=1&txtAddress='+txtAddress+'&txtTel='+txtTel+'&txtEmail='+txtEmail+'&txtName='+txtName+'&txtCom='+txtCom+'&txtContent='+txtContent+'&txtCaptcha='+txtCaptcha; $.ajax({ url: site+'/index.php', type: "POST", data: data, cache: false, success: function (html) { $("#contact_loading").hide(); if(html==1) { $("#contact_content").fadeOut(); $("#contact_done").fadeIn(); } else if(html) { alert(html); $("#btnContact").attr("disabled",false); $("#captchaimg").attr("src",site+"/index.php/captcha/" + Math.random()); } else { alert('Không thể kết nối tới máy chủ, vui lòng thử lại!'); $("#btnContact").attr("disabled",false); } } }); return false; })(jQuery); } function rating(like,dislike,movie_id) { ( function($) { var data = 'rating=1&like='+like+'&movie_id='+movie_id+'&dislike='+dislike; $.ajax({ url: site+"/index.php", type: "POST", data: data, cache: true, success: function (html) { if (html) { $('#rating_field').html(html); } else alert('Không thể kết nối tới máy chủ, vui lòng thử lại!'); } }); return false; }) ( jQuery ); }