function fix_png_bgicons(a){if($.browser.msie&&$.browser.version<7){a.each(function(){var c=$(this).css("backgroundImage");c=c.replace(/url\(['"]?([^'")]*)['"]?\)/,"$1");if(c.match(/.*\.png([?].*)?$/i)){var b=$("<img/>");$(this).addClass("icon-ie6-pngfix-hide").prepend(b);b.addClass("icon-ie6-pngfix-sub").attr("align","middle").attr("src",c)}})}}function createCookie(c,d,e){if(e){var b=new Date();b.setTime(b.getTime()+(e*24*60*60*1000));var a="; expires="+b.toGMTString()}else{var a=""}document.cookie=c+"="+d+a+"; path=/"+(window.qz_cookie_domain?"; domain="+window.qz_cookie_domain:"")}function readCookie(b){var e=b+"=";var a=document.cookie.split(";");for(var d=0;d<a.length;d++){var f=a[d];while(f.charAt(0)==" "){f=f.substring(1,f.length)}if(f.indexOf(e)==0){return f.substring(e.length,f.length)}}return null}function eraseCookie(a){createCookie(a,"",-1)};
;
/*
 * debug - v0.3 - 6/8/2009
 * http://benalman.com/projects/javascript-debug-console-log/
 * 
 * Copyright (c) 2009 "Cowboy" Ben Alman
 * Licensed under the MIT license
 * http://benalman.com/about/license/
 * 
 * With lots of help from Paul Irish!
 * http://paulirish.com/
 */
window.debug=(function(){var i=this,b=Array.prototype.slice,d=i.console,h={},f,g,m=9,c=["error","warn","info","debug","log"],l="assert clear count dir dirxml group groupEnd profile profileEnd time timeEnd trace".split(" "),j=l.length,a=[];while(--j>=0){(function(n){h[n]=function(){m!==0&&d&&d[n]&&d[n].apply(d,arguments)}})(l[j])}j=c.length;while(--j>=0){(function(n,o){h[o]=function(){var q=b.call(arguments),p=[o].concat(q);a.push(p);e(p);if(!d||!k(n)){return}d.firebug?d[o].apply(i,q):d[o]?d[o](q):d.log(q)}})(j,c[j])}function e(n){if(f&&(g||!d||!d.log)){f.apply(i,n)}}h.setLevel=function(n){m=typeof n==="number"?n:9};function k(n){return m>0?m>n:c.length+m<=n}h.setCallback=function(){var o=b.call(arguments),n=a.length,p=n;f=o.shift()||null;g=typeof o[0]==="boolean"?o.shift():false;p-=typeof o[0]==="number"?o.shift():n;while(p<n){e(a[p++])}};return h})();
;
/*
 * Object Utils - v0.91 - 3/28/2009
 * http://benalman.com/
 * 
 * Copyright (c) 2009 "Cowboy" Ben Alman
 * Licensed under the MIT license
 * http://benalman.com/about/license/
 * 
 * Note: the setObject, getObject, and exists methods were inspired by Dojo,
 * which is Copyright (c) 2005-2009, The Dojo Foundation.
 */
(function($){$.setObject=function(){var f=a(arguments),h=f.parts.pop(),g=e(f.context,f.parts,true);return g&&typeof g==="object"&&h?(g[h]=f.remain):undefined};$.getObject=function(){var f,g=arguments;if(!g.length||typeof g[0]==="number"){return b(g[0])}else{f=a(g);return f.callback?c(f):e(f.context,f.parts,f.remain)}};var d=[];function b(g){var f=typeof g==="number"&&d[g-1];if(f&&f.timeout_id){clearTimeout(f.timeout_id);f.timeout_id=null;return true}return false}function c(g){var f,i,h={};return(function(){f=e(g.context,$.extend([],g.parts));if(f===undefined){h.timeout_id=setTimeout(arguments.callee,g.delay);return i=i||d.push(h)}else{h.timeout_id=null;g.callback.call(g.context,f);return}})()}$.exists=function(){var f=a(arguments);return e(f.context,f.parts)!==undefined};function e(i,h,f){var g;while(i&&h.length){g=h.shift();if(!i[g]&&f){i[g]={}}i=i[g]}return i}function a(g){var f={};g=Array.prototype.slice.call(g);f.callback=$.isFunction(g[0])?g.shift():null;f.delay=f.callback&&typeof g[0]==="number"?Math.max(g.shift(),0):50;f.context=typeof g[0]!=="string"?g.shift():window;f.parts=g.shift().split(".");f.remain=g.shift();return f}})(jQuery);
;
/*
 * URL Utils - v0.97 - 5/3/2009
 * http://benalman.com/
 * 
 * Copyright (c) 2009 "Cowboy" Ben Alman
 * Licensed under the MIT license
 * http://benalman.com/about/license/
 */
(function($){var p,E={},h=Array.prototype.slice,j=document.location,c,x,B,e,a,l,b,G,n="urlInternal",g="urlExternal",f="queryString",z="fragment",H="update",t="passQueryString",k="passFragment",F="fragmentChange",s,r;function A(I){return typeof I==="string"}function w(I){return typeof I==="object"}function y(){var I=h.call(arguments),J=I.shift();return function(){return J.apply(this,I.concat(h.call(arguments)))}}function i(){return j.href.replace(/^[^#]*#?/,"")}$.urlTagAttrList=c=function(I){return $.extend(E,I)};c({a:"href",img:"src",form:"action",base:"href",script:"src",iframe:"src",link:"href"});function m(I){var J=I.nodeName;return J?E[J.toLowerCase()]:""}$.urlInternalHost=x=function(K){K=K?"(?:"+K+"\\.)?":"";var I=new RegExp("^"+K+"(.*)","i"),J="^"+j.protocol+"//"+j.hostname.replace(I,K+"$1")+(j.port?":"+j.port:"")+"/";return B(J)};$.urlInternalRegExp=B=function(I){if(I){p=A(I)?new RegExp(I,"i"):I}return p};x("www");$.isUrlInternal=e=function(I){if(!I){return undefined}if(/^(?:#|javascript:|mailto:|news:|tel:|im:)/i.test(I)){return undefined}if(p.test(I)){return true}if(!/^[^:]+:\/\//.test(I)){return true}if(!/^https?:\/\//.test(I)){return undefined}return false};$.isUrlExternal=a=function(J){var I=e(J);return typeof I==="boolean"?!I:I};l=function(J,I){return this.filter(":"+J+(I?"("+I+")":""))};$.fn[n]=y(l,n);$.fn[g]=y(l,g);b=function(M,L,K,J){var I=J[3]||m(L);return I?!!M($(L).attr(I)):false};$.expr[":"][n]=y(b,e);$.expr[":"][g]=y(b,a);function u(L,K,J,I){var M;if(A(J)||w(J)){return q(K,J,I,L)}else{if(w(K)){return $.param(K)}else{if(A(K)){return v(K,J,L)}else{M=L?i():j.search;return v(M,K,L)}}}}$[f]=y(u,0);$[z]=y(u,1);function d(){var J,M,I,K=h.call(arguments),L=K.shift();if(A(K[1])||w(K[1])){J=K.shift()}M=K.shift();I=K.shift();return this.each(function(){var N=J||m(this),O=N&&$(this).attr(N)||"";O=u(L,O,M,I);$(this).attr(N,O)})}$.fn[f]=y(d,0);$.fn[z]=y(d,1);function D(){var J=h.call(arguments),K=J.shift(),I=J.shift(),L=u(K);if($.isFunction(J[0])){L=J.shift()(L)}else{if($.isArray(J[0])){$.each(J.shift(),function(N,M){delete L[M]})}}return u(K,I,L,J.shift())}$[t]=y(D,0);$[k]=y(D,1);function C(){var I,J=h.call(arguments),K=J.shift();if(A(J[0])){I=J.shift()}return this.each(function(){var L=I||m(this),M=L&&$(this).attr(L)||"";M=D.apply(this,[K,M].concat(J));$(this).attr(L,M)})}$.fn[t]=y(C,0);$.fn[k]=y(C,1);function v(L,K,N){var I,P,J,M={},O={"null":null,"true":true,"false":false},Q=N?/^.*[#]/:/^.*[?]|#.*$/g;L=L.replace(Q,"").replace(/\+/g," ").split("&");while(L.length){I=L.shift().split("=");P=decodeURIComponent(I[0]);if(I.length===2){J=decodeURIComponent(I[1]);if(K){if(J&&!isNaN(J)){J=Number(J)}else{if(J==="undefined"){J=undefined}else{if(O[J]!==undefined){J=O[J]}}}}if($.isArray(M[P])){M[P].push(J)}else{if(M[P]!==undefined){M[P]=[M[P],J]}else{M[P]=J}}}else{if(P){M[P]=K?undefined:""}}}return M}function q(I,K,J,N){var O,Q=N?/^([^#]*)[#]?(.*)$/:/^([^#?]*)[?]?([^#]*)(#?.*)/,M=I.match(Q),P=v(M[2],0,N),L=M[3]||"";if(A(K)){K=v(K,0,N)}if(J===2){O=K}else{if(J===1){O=$.extend({},K,P)}else{O=$.extend({},P,K)}}O=$.param(O);return M[1]+(N?"#":O||!M[1]?"?":"")+O+L}$.setFragment=G=function(I){var J=w(I)?u(true,I):(I||"").replace(/^#/,"");j.href=j.href.replace(/#.*$/,"")+"#"+J};$[F]=function(I){if(I===true){I=100}if(s){clearTimeout(s);s=null}if(typeof I==="number"){r=i();if($.isFunction(o)){o=o()}(function(){var J,L=i(),K=o[z](r);if(L!==r){o[H](L,K);r=L;J=$.Event(F);J[z]=L;$(document).trigger(J)}else{if(K!==r){G(K)}}s=setTimeout(arguments.callee,I<0?0:I)})()}};function o(){var I,J={};J[H]=J[z]=function(K){return K};if($.browser.msie&&$.browser.version<8){J[H]=function(M,K){var L=I.document;if(M!==K){L.open();L.close();L.location.hash="#"+M}};J[z]=function(){return I.document.location.hash.replace(/^#/,"")};I=$("<iframe/>").hide().appendTo("body").get(0).contentWindow;J[H](i())}return J}})(jQuery);
;
/*
 * nth-last-child - v0.1 - 5/5/2009
 * http://benalman.com/
 * 
 * Copyright (c) 2009 "Cowboy" Ben Alman
 * Licensed under the MIT license
 * http://benalman.com/about/license/
 */
(function($){$.expr[":"]["nth-last-child"]=function(e,b,a){var d=0,c=e.parentNode.firstChild;if(e.nodeIndex){d=$.sibling(c,e).length}else{do{if(c&&c.nodeType===1){c.nodeIndex=++d}}while(c=c.nextSibling)}return e.nodeIndex===d+2-(a[3]||0)}})(jQuery);
/*
 * filterAll - v0.3 - 4/18/2009
 * http://benalman.com/
 * 
 * Copyright (c) 2009 "Cowboy" Ben Alman
 * Licensed under the MIT license
 * http://benalman.com/about/license/
 */
(function($){var a="filterAll";$.fn[a]=function(b){var c=b===undefined||b===false||$.isFunction(b)&&b.apply(this,Array.prototype.slice.call(arguments,1))===false?$([]):this;return this.pushStack(c,a,b)}})(jQuery);
/*
 * getClassData - v1.1 - 3/30/2009
 * http://benalman.com/
 * 
 * Copyright (c) 2009 "Cowboy" Ben Alman
 * Licensed under the MIT license
 * http://benalman.com/about/license/
 */
(function($){var b,a="getClassData";$[a]=b=function(h,g,d){var e,c,f=[];d=d||"-";e=new RegExp("(?:^|\\s)"+g+d+"(\\S+)","g");while(c=e.exec(h)){f.push(c[1])}return f.join(" ")};$.fn[a]=function(d,c){return b($(this).attr("class"),d,c)}})(jQuery);
/*
 * defaultText - v1.0 - 2/21/2009
 * http://benalman.com/
 * 
 * Copyright (c) 2009 "Cowboy" Ben Alman
 * Licensed under the MIT license
 * http://benalman.com/about/license/
 */
(function($){var c="default",b,a="defaultText";$.defaultTextClass=b=function(d){c=d};$.fn[a]=function(f){var e="."+a,d="focus"+e,g="blur"+e;return this.each(function(){if(f){$(this).unbind(e).bind(d,function(){var h=$(this);if(h.val()===f){h.val("").removeClass(c)}}).bind(g,function(){var h=$(this);if($.trim(h.val())===""||h.val()===f){h.addClass(c).val(f)}}).trigger(g)}else{$(this).trigger(d).unbind(e)}})}})(jQuery);
/*
 * unwrap - v1.0 - 1/13/2009
 * http://benalman.com/
 * 
 * Copyright (c) 2009 "Cowboy" Ben Alman
 * Licensed under the MIT license
 * http://benalman.com/about/license/
 */
(function($){$.fn.unwrap=function(){return this.each(function(){$(this).parent().replaceWith(this)})}})(jQuery);
/*
 * getUniqueClass - v1.0 - 1/27/2009
 * http://benalman.com/
 * 
 * Copyright (c) 2009 "Cowboy" Ben Alman
 * Licensed under the MIT license
 * http://benalman.com/about/license/
 */
(function($){$.getUniqueClass=function(){var b,a=0;while($("."+(b="BA-"+(+new Date)+(a++))).length){}return b}})(jQuery);
/*
 * emailSpammerize - v1.1 - 3/14/2009
 * http://benalman.com/
 * 
 * Copyright (c) 2009 "Cowboy" Ben Alman
 * Licensed under the MIT license
 * http://benalman.com/about/license/
 */
(function($){var b="emailSpammerize",a={at:"@",dot:".",plus:"+",dash:"-",underscore:"_",bang:"!",hash:"#",dollar:"$",percent:"%",ampersand:"&",quote:"'",asterisk:"*",slash:"/",equals:"=",question:"?",caret:"^",backtick:"`",pipe:"|",tilde:"~"};$[b]=function(c,e){var d;$.each(a,function(g,f){d=new RegExp("\\s+"+g+"\\s+","gi");c=c.replace(d,f)});c=c.replace(/(\s+|\[|\])/g,"");c=$.map(c,function(f){return"&#"+f.charCodeAt()+";"}).join("");if(e){c='<a href="mailto:'+c+'">'+c+"</a>"}return c};$.fn[b]=function(c){return this.each(function(){var d=$(this).text();$(this).html($[b](d,c))})}})(jQuery);
;
/*
 * qq - v1.3 - 3/12/2009
 * http://benalman.com/
 * 
 * Copyright (c) 2009 "Cowboy" Ben Alman
 * Licensed under the MIT license
 * http://benalman.com/about/license/
 */
(function(f){var d=[],e=Array.prototype.slice,a,c;f.qq=function(k,j){var i,h;if(typeof k!=="number"){j=k;k=null}if(k){f.extend(b(k),j)}else{h={delay:0,queue:[],oneach:null,ondone:null,paused:false,id:d.length+1,running:false,timeout_id:null};i=f.extend({},h,j);k=d.push(i);if(!i.paused){a(k)}}return k};f.qqAdd=c=function(){var h=e.call(arguments),j=h.shift(),i=b(j);if(i){i.queue=i.queue.concat(h);if(!i.paused){a(j)}return j}return false};f.fn.qqAdd=function(h){c(h,this.get());return this};f.fn.qqAddEach=function(h){c.apply(f,[h].concat(this.get()));return this};f.qqPause=function(i){var h=b(i);if(h){g(h);h.paused=true;return i}return false};f.qqStart=a=function(j){var h,i=b(j);if(i){i.paused=false;if(!i.queue.length){return j}if(!i.running){i.running=true;(function(){if(!i.queue.length){g(i);i.ondone&&i.ondone();return}h=i.queue.shift();if(i.oneach&&i.oneach(h)===false){i.queue.unshift(h)}if(typeof i.delay==="number"&&i.delay>=0){i.timeout_id=setTimeout(arguments.callee,i.delay)}})()}return j}return false};f.qqClear=function(i){var h=b(i);if(h){g(h);h.queue=[];return i}return false};f.qqNext=function(j,h){var i=b(j);if(i){if(i.paused){return false}if(h){i.queue.unshift(h)}i.running=false;if(!i.queue.length){g(i);i.ondone&&i.ondone()}return a(j)}return false};function b(h){return typeof h==="number"&&d[h-1]}function g(h){h.timeout_id&&clearTimeout(h.timeout_id);h.timeout_id=null;h.running=false}})(jQuery);
;
/*
 * postMessage - v0.5 - 9/11/2009
 * http://benalman.com/
 * 
 * Copyright (c) 2009 "Cowboy" Ben Alman
 * Licensed under the MIT license
 * http://benalman.com/about/license/
 */
(function($){var b,d,j=1,a,f=this,g=!1,h="postMessage",c="addEventListener",e,i=f[h]&&!$.browser.opera;$[h]=function(k,m,l){if(!m){return}k=typeof k==="string"?k:$.param(k);l=l||parent;if(i){l[h](k,m.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))}else{if(m){l.location=m.replace(/#.*$/,"")+"#"+(+new Date)+(j++)+"&"+k}}};$.receiveMessage=e=function(m,l,k){if(i){if(m){a&&e();a=function(n){if((typeof l==="string"&&n.origin!==l)||($.isFunction(l)&&l(n.origin)===g)){return g}m(n)}}if(f[c]){f[m?c:"removeEventListener"]("message",a,g)}else{f[m?"attachEvent":"detachEvent"]("onmessage",a)}}else{b&&clearInterval(b);b=null;if(m){k=typeof l==="number"?l:typeof k==="number"?k:100;b=setInterval(function(){var o=document.location.hash,n=/^#?\d+&/;if(o!==d&&n.test(o)){d=o;m({data:o.replace(n,"")})}},k)}}}})(jQuery);
;
(function(b){b.ifixpng=function(c){b.ifixpng.pixel=c};b.ifixpng.getPixel=function(){return b.ifixpng.pixel||"images/pixel.gif"};var a={ltie7:b.browser.msie&&b.browser.version<7,filter:function(c){return"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='"+c+"')"}};b.fn.ifixpng=a.ltie7?function(){return this.each(function(){var c=b(this);var e=b("base").attr("href");if(e){e=e.replace(/\/[^\/]+$/,"/")}if(c.is("img")||c.is("input")){if(c.attr("src")){if(c.attr("src").match(/.*\.png([?].*)?$/i)){var d=(e&&c.attr("src").search(/^(\/|http:)/i))?e+c.attr("src"):c.attr("src");c.css({filter:a.filter(d),width:c.width(),height:c.height()}).attr({src:b.ifixpng.getPixel()}).positionFix()}}}else{var f=c.css("backgroundImage");if(f.match(/^url\(["']?(.*\.png([?].*)?)["']?\)$/i)){f=RegExp.$1;f=(e&&f.substring(0,1)!="/")?e+f:f;c.css({backgroundImage:"none",filter:a.filter(f)}).children().children().positionFix()}}})}:function(){return this};b.fn.iunfixpng=a.ltie7?function(){return this.each(function(){var c=b(this);var d=c.css("filter");if(d.match(/src=["']?(.*\.png([?].*)?)["']?/i)){d=RegExp.$1;if(c.is("img")||c.is("input")){c.attr({src:d}).css({filter:""})}else{c.css({filter:"",background:"url("+d+")"})}}})}:function(){return this};b.fn.positionFix=function(){return this.each(function(){var d=b(this);var c=d.css("position");if(c!="absolute"&&c!="relative"){d.css({position:"relative"})}})}})(jQuery);
;
/*
 * fixBgIcons - v0.2 - 4/18/2009
 * http://benalman.com/
 * 
 * Copyright (c) 2009 "Cowboy" Ben Alman
 * Licensed under the MIT license
 * http://benalman.com/about/license/
 */
(function(a){a.fn.fixBgIcons=function(){var b=a.browser.version;if(a.browser.msie&&b<=7){return this.each(function(){var g=a(this),h=g.css("display"),j=g.css("backgroundImage"),d,e,c={backgroundImage:"none"},i={display:"inline",border:"0",padding:"0",width:"16px",height:"16px"},f={w:0,h:0};j=j.replace(/url\(['"]?([^'")]*)['"]?\)/i,"$1");if(/[.]png([?].*)?$/i.test(j)&&(b==6||h==="inline")){d=a("<img/>");e={x:parseInt(g.css("backgroundPositionX")),y:parseInt(g.css("backgroundPositionY"))};g.parents().each(function(){if(this.currentStyle.hasLayout){var k=a(this);f.w=k.innerWidth();f.h=k.innerHeight();return false}});if(e.x===f.w){if(h==="inline"){g.append(d);c.paddingRight="0";if(b==6){i.margin="-3px 0 -6px 4px"}else{i.paddingLeft="4px";i.margin="-3px 0 -6px"}}else{g.prepend(d);i["float"]="right"}}else{g.prepend(d);c.paddingLeft="0";i.margin="-3px 0 -6px";i.paddingRight="4px"}d.css(i).attr({align:"middle",src:j});g.css(c)}})}else{return this}}})(jQuery);
;
/*
 * Autotab - jQuery plugin 1.0
 * http://dev.lousyllama.com/auto-tab
 * 
 * Copyright (c) 2008 Matthew Miller
 * 
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 * 
 * Revised: 2008/05/22 01:23:26
 */
(function(a){a.fn.autotab=function(b){var e={format:"all",maxlength:2147483647,uppercase:false,lowercase:false,nospace:false,target:null,previous:null};a.extend(e,b);var f=function(g){var j=null;var i=a("#"+g)[0];var h=a("input[name="+g+"]")[0];if(i!=undefined){j=a(i)}else{if(h!=undefined){j=a(h)}}return j};var d=function(g){if(!g){g=window.event}return g.keyCode};if(typeof e.target=="string"){e.target=f(e.target)}if(typeof e.previous=="string"){e.previous=f(e.previous)}var c=a(this).attr("maxlength");if(e.maxlength==2147483647&&c!=2147483647){e.maxlength=c}else{if(e.maxlength>0){a(this).attr("maxlength",e.maxlength)}else{e.target=null}}if(a.browser.msie){this.keydown(function(g){if(d(g)==8){var h=this.value;if(h.length==0&&e.previous){e.previous.focus()}}})}return this.keypress(function(g){if(d(g)==8){var h=this.value;if(h.length==0&&e.previous){e.previous.focus()}}}).keyup(function(j){var k=this.value;switch(e.format){case"text":var i=new RegExp("[0-9]+","g");var k=k.replace(i,"");break;case"alpha":var i=new RegExp("[^a-zA-Z]+","g");var k=k.replace(i,"");break;case"number":case"numeric":var i=new RegExp("[^0-9]+","g");var k=k.replace(i,"");break;case"alphanumeric":var i=new RegExp("[^0-9a-zA-Z]+","g");var k=k.replace(i,"");break;case"all":default:break}if(e.nospace){i=new RegExp("[ ]+","g");k=k.replace(i,"")}if(e.uppercase){k=k.toUpperCase()}if(e.lowercase){k=k.toLowerCase()}this.value=k;var h=[8,9,16,17,18,19,20,27,33,34,35,36,37,38,39,40,45,46,144,145];var g=h.toString();if(g.indexOf(d(j))==-1&&k.length==e.maxlength&&e.target){e.target.focus()}})}})(jQuery);
;
$(function(){$("#content ul li, #footer li a, .icon, .icon-right").fixBgIcons();$.ifixpng("http://cdn.mgsrvr.com/quazar/shared/images/spacer.gif");$("img[src$=.png]").ifixpng();$("#debug a").click(function(){$(this).siblings("pre").toggle();return false});$("#debug").show();$("a, form").urlInternal().each(function(){var b=$(this);b.passQueryString(function(d){for(var c in d){if(/^[a-z]?_/.test(c)){delete d[c]}}delete d.results;if(d.gclid){delete d.gclid;d.srp=1}if(b.is(".country_choice")){delete d.country_code}return d})});var a=$.browser.msie&&$.browser.version<7;if(a){$("label:not([for]):has(:input)").live("click",function(b){b.ie6fix||$(this).find(":input").trigger({type:"click",ie6fix:1})})}$("ol.questions li.answer-radio, ol.questions li.answer-checkbox").live("mouseover",function(){$(this).addClass("hover")}).live("mouseout",function(){$(this).removeClass("hover")}).live("click",function(b){if(!b.exclusive){if($(b.target).find("label").length){$(this).find(a?"label":":input").trigger({type:"click",exclusive:1})}if(!/^(?:SPAN|LABEL)$/i.test(b.target.nodeName)&&(!a||b.ie6fix)){$(this).trigger("clickonce")}}});$("div.list-fancy-quiz, div.list-fancy-plquiz, div.list-fancy-sweeps, div.list-fancy-quizfeed").find(".title").each(function(){$(this).find("a:first").append('<span class="hit"><span class="hit1"/></span>')})});$(function(){if($("body").hasClass("sweeps-demo")){var b=document.location.search.match(/[?&](srp|gclid)=([^&]+)/);if(b){var c=b[2];var a=$("input[name=q_show_revenue]");if(c&&c!=0&&a.length&&(a.val()==undefined||a.val()=="")){a.val(1)}}}$(".demo .readonly select").each(function(){$(this).find("option:selected").addClass("selected")}).change(function(){$(this).val($(this).find("option.selected").val());return false});$("form.country_choice").submit(function(){var d=$(this);$("#demo_form :input:not(:hidden):not(:password)").each(function(){var e=$(this);$('<input type="hidden" name="'+e.attr("name")+'"/>').val(e.val()).appendTo(d)})});apply_phone_autotab()});function apply_phone_autotab(){$("#ad_engine_phone_home, #ad_engine_phone_work, #ad_engine_phone_mobile").each(function(){var c=$(this).attr("id"),g=c+"\\.area",e=c+"\\.exchange",f=c+"\\.local",d=$("#"+g),a=$("#"+e),b=$("#"+f);debug.log(d.length,a.length,b.length);if(d.length+a.length+b.length!==3){return}d.autotab({target:e,format:"numeric",maxlength:3}).attr("autocomplete","off");a.autotab({target:f,previous:g,format:"numeric",maxlength:3}).attr("autocomplete","off");b.autotab({previous:e,format:"numeric",maxlength:4}).attr("autocomplete","off")})}$(function(){$("body.asset_type-plquiz .section-demo_form").each(function(){$("#ad_engine_email:visible, #ad_engine_password:visible").after('<img class="lock" src="http://cdn.mgsrvr.com/quazar/shared/images/icons/fff/lock.png" alt=""/>');$("#ad_engine_email:visible").parent().append('<span class="disclaimer">A confirmation email will be sent to this address</span>');$("#ad_engine_password:visible").parent().css({marginBottom:"3em"})})});if($("#pl_form .modal_content_wrap").length){$("#pl_form").submit(function(e){if($("#pl_form").data("locked")){return false}if($(this).find(".modal_content_wrap").css("visibility")=="visible"){$("#pl_form").data("locked",1);$("div.modal_content_wrap :submit").addClass("hidden").after('<img class="top_pad_1" src="http://cdn.mgsrvr.com/quazar/images/shell/spinner.gif" id="submit_spinner">');$.post(document.location.href,$(this).serialize()+"&validate_only=1",function(data){var response_body=$(data);if(response_body.find(".section-demo_form div.error").length){$("#pl_form .section-demo_form").html(response_body.find(".section-demo_form").html());apply_phone_autotab();apply_hints();$("#pl_form").removeData("locked");$("div.modal_content_wrap :submit").removeClass("hidden").next().remove();var m_wrap=$("div.modal_content_wrap");m_wrap.css(get_demo_modal_dimensions(m_wrap))}else{window.onbeforeunload=null;$("#pl_form").unbind("submit").submit()}},"html")}else{var form_success=1;var invalid={};$(this).find(":radio, select").each(function(){if($(this).parents(".section-demo_form").length){return}if($(this).attr("name")&&$(this).attr("name")!="opt_to_pop"){if(($(this).is("select")&&$(this).find("option:selected").val()!="")||($(this).attr("type")=="radio"&&$(this).attr("checked"))){invalid[$(this).attr("name")]=0}else{if(!invalid.hasOwnProperty($(this).attr("name"))){invalid[$(this).attr("name")]=1}}}});var age;if($(this).find(".answer-birth_date").length){var names=$.map($(this).find(".answer-birth_date select"),function(ele){return $(ele).attr("name")});if(!$.grep(names,function(name){return invalid[name]}).length){var year=$(this).find(".answer-birth_date select[name$=_year]").val();var month=$(this).find(".answer-birth_date select[name$=_month]").val();var day=$(this).find(".answer-birth_date select[name$=_day]").val();var birth_date=new Date(year,month-1,day);if(birth_date.getDate()!=parseInt(day)){invalid[$(this).find(".answer-birth_date select[name$=_year]").attr("name")]=1}else{var curr_date_vals=$("input[name=birth_date_dt]").val().split("-");var curr_date=new Date(curr_date_vals[0],curr_date_vals[1]-1,curr_date_vals[2]);age=Math.floor((curr_date.getTime()-birth_date.getTime())/31536000000)}}}var invalid_submit=0;for(var name in invalid){var ul=$(":input[name="+name+"]:first").parents("ul.answers");if(invalid[name]){if(!ul.parent().find("div.error").length){ul.before('<div class="error"><p>Please answer this question.</p></div>')}invalid_submit=1}else{ul.parent().find("div.error").remove()}}if(invalid_submit){$(document).scrollTop($("div.error:first").parents("li.question").offset().top);return false}if(age&&(age>65||age<13)){return true}$("#sidebar > *").remove();$(document).scrollTop(0);var m_wrap=$("div.modal_content_wrap");m_wrap.append($("div.section-submit_button").remove().find(".section-inner").addClass("center").end());m_wrap.after('<div id="modal_content_bg"></div>');$("#modal_content_bg").css({height:$(document).height()+"px",width:$(document).width()+"px",top:"-"+$("#content-inner").offset().top+"px",left:"-"+$("#content-inner").offset().left+"px"});m_wrap.css(get_demo_modal_dimensions(m_wrap)).addClass("modal_content_visible");var results_url;try{var q_state_str=$("input[name=q_state]").val();var q_state=eval("("+q_state_str+")");var answers=q_state.q_user_data;var x=0;while(1){var key="q_"+x+"_a";if(q_state.hasOwnProperty(key)){answers+="|"+q_state[key]}else{break}x++}$("li.question:not(.question-coreg, .sponsored)").each(function(){var field=$(this).find(":radio:checked,:checkbox:checked");if(field.length){answers+="|"+field.val()}});results_url=document.location.href.match("^([^?]+)")[1];results_url+="?q_result="+encodeURIComponent(answers);results_url+="&e_close=1"}catch(e){}if(results_url){window.onbeforeunload=function(){document.location.href=results_url;var msg="\n";msg+="____________________________________________________\n\n";msg+='CLICK "CANCEL" BELOW TO VIEW YOUR QUIZ RESULTS NOW!!\n\n';msg+="____________________________________________________\n";return msg};$("a").click(function(){window.onbeforeunload=null})}}return false})}function get_demo_modal_dimensions(c){var b=25;var e=10;var a={top:0,left:0,width:0,height:0};c.find("> *").each(function(){a.height+=$(this).outerHeight()});c.children().each(function(){if(a.width<$(this).outerWidth()){a.width=$(this).outerWidth()}});a.width+=e;a.top=$(window).height()/2-a.height/2-$("#content-inner").offset().top;a.left=$(window).width()/2-a.width/2-$("#content-inner").offset().left;if(a.top<b-$("#content-inner").offset().top){a.top=b-$("#content-inner").offset().top}for(var d in a){a[d]+="px"}return a}$(function(){var b,a;function c(e){var d=[document.location.pathname,e,b.name].join("/");if(window._gaq){debug.log(["[GA] sponsored question",d]);_gaq.push(["_trackPageview",d])}}if(window.SPONSORED_QUESTION){a=readCookie("sq");a=a?a.split(","):[];debug.log("sq cookie",a);b=(function(e){var g,h=0,d=0;var f=function(k,j){if(h||$.inArray(j.question_id,a)===-1){d+=Number(j.percent);if(Math.random()*d<j.percent){g=j}}};$.each(e,f);if(!g){h=1;$.each(e,f)}return g})(SPONSORED_QUESTION);debug.log("sq",b);c("SQDraw");if(b.question_id=="57"){b.disclaimer='<div class="right"><em>*With mobile subscription</em></div>'}$("ol.questions li.question:has(.answer-radio):last").each(function(){var d=$(this);d.clone().attr("class","question sponsored").find(".sq-remove").remove().end().find("h3").text(b.question_text).before('<div class="number"><img src="'+b.image+'" /></div>').end().find("div.error, p").remove().end().find("li:not(:first)").remove().end().find("li:first").each(function(){var e=$(this);e.clone().insertAfter(e).addClass("sponsored_question1").find(".label").text(b.no_answer_text).end().find("input").replaceWith('<input class="radio" type="radio" name="opt_to_pop" value="1"/>').end()}).addClass("sponsored_question0").find(".label").text(b.yes_answer_text).end().find("input").replaceWith('<input class="radio" type="radio" name="opt_to_pop" value="0"/>').end().end().insertAfter("ol:last").wrap('<ol class="questions"></ol>').click(function(i){var h=$(i.target),f=h.closest("li");if(!($.browser.msie&&$.browser.version==6)&&h.is("span.label")){return}i.stopPropagation();if(f.is(".sponsored_question1")){c("SQIgnore")}else{if(f.is(".sponsored_question0")){var j=window.qz_gatherer_id||"",g=b.link.replace(/__gatherer_id__|$/,j);c("SQOut");window.open(g)}else{return}}if($.inArray(b.question_id,a)===-1){a.push(b.question_id);createCookie("sq",a.join(","),180);debug.log("sq cookie set",a)}});$("#closer-inner").addClass("clear")})}});$(function(){function a(){$(window).unbind(".exit_pop")}if(window.exit_pop_url){$(window).bind("unload.exit_pop",function(){window.open(exit_pop_url)});$("a, input:submit").live("click",a);$("input:submit").submit(a)}});$(function(){var c=$("#quiz_form, #pl_form, #demo_form").eq(0),a=$.queryString(),b={publisher_id:function(){if(a.gatherer_id){return false}var e=document.referrer,d="300000";if(e){$.each(window.qz_roia.publisher_id||[],function(g,f){if(f[1].test(e)){d=f[0];return false}})}return d},campaign_id:function(){return window.qz_roia.campaign_id},creative_id:function(){return window.qz_roia.creative_id}};if(/iqtestmaster\.com$/.test(document.location.hostname)&&!a.gatherer_id&&!a.publisher_id){$("a:urlInternal").queryString({gatherer_id:b.publisher_id()})}if(!c.length){return}$.each(b,function(f,e){var d;if(!c.find("input[name="+f+"]").length&&!a[f]){if(d=e()){debug.log("set",f,d);$('<input type="hidden" name="'+f+'" value="'+d+'"/>').appendTo(c)}}})});window.qz_roia=window.qz_roia||{};
/* // for minification
*/ // for minification
try {
  window.qz_roia.publisher_id = [
    [ '300001', /^https?:\/\/www\.google\.(?:com|co\.\w+)\/search/i ],
    [ '300001', /^https?:\/\/www\.ask\.com/i ],
    [ '300001', /^https?:\/\/www\.yandex\.ru/i ],
    [ '300001', /^https?:\/\/www\.altavista\.com/i ],
    [ '300001', /^https?:\/\/search\.yahoo\.com\/search/i ],
    [ '300001', /^https?:\/\/www\.bing\.com\/search/i ],
    [ '300001', /^https?:\/\/search\.aol\.com/i ],
    [ '300001', /^https?:\/\/www\.search\.com/i ],
    [ '300002', /^https?:\/\/www\.msplinks\.com/i ],
    [ '300002', /^https?:\/\/(?:[^.]+\.)*myspace\.com/i ],
    [ '300003', /^https?:\/\/(?:[^.]+\.)*facebook\.com/i ],
    [ '300004', /./ ]
  ];
} catch (e) {
  window.qz_roia.publisher_id = [];
};
/* // for minification
*/
$(function(){var b=$("body.quiz-page-1"),a=$.queryString();if(!a.tr){return}b.each(function(){var c=$(this),d=new TitleRotator(a.tr,(a.trt||1)*1000);$("body").bind("click.title_rotator",function(){d.stop();c.unbind(".title_rotator")})})});function TitleRotator(b,a){this.title_arr=b;this.delay=a||1000;this.interval_id=null;this.orig_title=null;this.current=null;this.start()}TitleRotator.prototype.start=function(){if(this.interval_id){return false}this.orig_title=document.title;this.current=-1;var a=this;this.update();this.interval_id=setInterval(function(){a.update()},this.delay);return true};TitleRotator.prototype.stop=function(){if(this.interval_id){clearInterval(this.interval_id);this.interval_id=null}document.title=this.orig_title};TitleRotator.prototype.toggle=function(){if(this.interval_id){this.stop()}else{this.start()}};TitleRotator.prototype.update=function(){if(++this.current>=this.title_arr.length){this.current=0}document.title=this.title_arr[this.current]};var hint_hide_delay=500;var hints={email:{hint:"Make sure to enter your email address correctly so we can send you a personalized email confirming your quiz results.",fields:["email"]},name:{hint:"Enter your real first and last name to ensure that your personalized quiz results are accurate.",fields:["first_name","last_name"]},address:{hint:"Enter your home address here. Depending on where you are from your quiz results may vary.",fields:["address1","city","state_code","postal_code"]}};$(function(){apply_hints()});function apply_hints(){if($("div.hints").length){for(var a in hints){var b=undefined;$("#ad_engine_"+hints[a].fields.join(",#ad_engine_")).each(function(){var c=$(this);if(!b){b=$('<span id="hint_'+a+'" class="hint"></span>').hide().text(hints[a].hint).data("hide_timeouts",[]).data("fields",$("#ad_engine_"+hints[a].fields.join(",#ad_engine_")));c.after(b)}c.data("hint_ele",b).addClass("hint_field")})}$(".hint_field").focus(show_hint).mouseover(show_hint).blur(hide_hint).mouseout(hide_hint)}}function show_hint(b){var a=$(this).data("hint_ele");clear_hides(a);if(b.type=="focus"){a.addClass("focused")}$("div.hints span.hint").not(a).stop().css("opacity","").hide().each(function(){$(this).data("fields").removeClass("hinted")});if(a.not(":visible")){a.fadeIn("fast");a.data("fields").addClass("hinted")}}function hide_hint(b){var a=$(this).data("hint_ele");if(b.type=="blur"){a.removeClass("focused")}var c=setTimeout(function(){clear_hides(a);if(b.type=="blur"){a.hide().data("fields").removeClass("hinted")}else{if(!a.hasClass("focused")){a.hide().data("fields").removeClass("hinted");if(!$("span.hint:visible").length&&$("span.hint.focused").length){$("span.hint.focused").fadeIn("fast").data("fields").addClass("hinted")}}}},hint_hide_delay);a.data("hide_timeouts").push(c)}function clear_hides(b){for(var a=0;a<b.data("hide_timeouts").length;a++){clearTimeout(b.data("hide_timeouts")[a])}b.data("hide_timeouts",[])};
;
