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=$("");$(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=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").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=''+c+""}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("");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); ; $("html").addClass("js");$(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('')})});$(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);$('').val(e.val()).appendTo(d)})});$("#ad_engine_phone_home, #ad_engine_phone_work, #ad_engine_phone_mobile").each(function(){var f=$(this).attr("id"),j=f+"\\.area",h=f+"\\.exchange",i=f+"\\.local",g=$("#"+j),d=$("#"+h),e=$("#"+i);debug.log(g.length,d.length,e.length);if(g.length+d.length+e.length!==3){return}g.autotab({target:h,format:"numeric",maxlength:3}).attr("autocomplete","off");d.autotab({target:i,previous:j,format:"numeric",maxlength:3}).attr("autocomplete","off");e.autotab({previous:h,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('');$("#ad_engine_email:visible").parent().append('A confirmation email will be sent to this address');$("#ad_engine_password:visible").parent().css({marginBottom:"3em"})})});$(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(d){d.sort(function(g,f){return +f.weight-+g.weight});var e=d[0];$.each(d,function(g,f){if($.inArray(f.id,a)===-1){debug.log("sq",f);e=f;return false}});return e})(SPONSORED_QUESTION);c("SQDraw");if(b.id=="57"){b.disclaimer='
*With mobile subscription
'}$("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('
').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.other_answer_text).end().find("input").replaceWith('').end()}).addClass("sponsored_question0").find(".label").text(b.link_answer_text).end().find("input").replaceWith('').end().end().insertAfter("ol:last").wrap('
    ').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.id,a)===-1){a.push(b.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);$('').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]}; ; $(function(){$("#closer-slideout > a").click(function(){var d=$(this).next(),c=d.is(":visible"),b=d.hide().css({position:"static",top:"auto",bottom:"auto"}).outerHeight(),a=["-"+b+"px"];a[c?"push":"unshift"](0);d.css({position:"absolute",top:a[0],bottom:$("#closer").innerHeight()}).show().animate({top:a[1]},300,function(){c&&$(this).hide()});return false});$("#tab-box").each(function(){var c=$(this),b=c.find(".tabs a"),a=c.find(".body .list-fancy");b.mouseenter(function(){var e=$(this),d=b.index(e);b.parent().removeClass("selected");e.parent().addClass("selected");a.filter(":visible").hide();a.eq(d).show()}).eq(0).triggerHandler("mouseenter")})}); ;