/*! H5F - v1.0.0 - 2012-07-18 * https://github.com/ryanseddon/H5F/ * Copyright (c) 2012 Ryan Seddon; Licensed MIT */ var H5F=H5F||{};(function(a){var b=a.createElement("input"),c=/^[a-zA-Z0-9.!#$%&'*+-\/=?\^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/,d=/[a-z][\-\.+a-z]*:\/\//i,e=/^(input|select|textarea)$/i,f,g,h,i,j="",k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;k=function(a,b){var c=!a.nodeType||!1,d={validClass:"valid",invalidClass:"error",requiredClass:"required",placeholderClass:"placeholder"};if(typeof b=="object")for(var e in d)typeof b[e]=="undefined"&&(b[e]=d[e]);i=b||d;if(c)for(var f=0,g=a.length;fd:!1},u=function(a){var b=!!a.attributes.required;return b?v(a):!1},v=function(a){var b=a.getAttribute("placeholder"),c=!!a.attributes.required;return!(!c||a.value!==""&&a.value!==b)},w=function(a,b,c,d){C(window,"addEventListener")?a.addEventListener(b,c,d):C(window,"attachEvent")&&typeof window.event!="undefined"&&(b==="blur"?b="focusout":b==="focus"&&(b="focusin"),a.attachEvent("on"+b,c))},x=function(a,b,c,d){C(window,"removeEventListener")?a.removeEventListener(b,c,d):C(window,"detachEvent")&&typeof window.event!="undefined"&&a.detachEvent("on"+b,c)},y=function(a){a=a||window.event,a.stopPropagation&&a.preventDefault?(a.stopPropagation(),a.preventDefault()):(a.cancelBubble=!0,a.returnValue=!1)},z=function(a){return a=a||window.event,a.target||a.srcElement},A=function(a,b){var c;a.className?(c=new RegExp("(^|\\s)"+b+"(\\s|$)"),c.test(a.className)||(a.className+=" "+b)):a.className=b},B=function(a,b){var c,d,e=typeof b=="object"?b.length:1,f=e;if(a.className)if(a.className===b)a.className="";else while(e--)c=new RegExp("(^|\\s)"+(f>1?b[e]:b)+"(\\s|$)"),d=a.className.match(c),d&&d.length===3&&(a.className=a.className.replace(c,d[1]&&d[2]?" ":""))},C=function(a,b){var c=typeof a[b],d=new RegExp("^function|object$","i");return!!(d.test(c)&&a[b]||c==="unknown")},window.H5F={setup:k}})(document);