var cachedAnchorResults=Array();var Imagini={flashCallbacks:Array(),startedCalls:Array(),bindEvents:function(a){$(a).find("a.ajaxable").click(function(d){var c=$(this);if(Imagini.startedCalls[c.attr("href")]==null){Imagini.startedCalls[c.attr("href")]=true}else{return false}c.busy(true);if(!cachedAnchorResults[c.attr("href")]){$.get($(this).attr("href"),{},function(e){c.blink();Imagini.checkResult(e);cachedAnchorResults[c.attr("href")]=e;c.busy(false);Imagini.startedCalls[c.attr("href")]=null},"json")}else{c.blink();Imagini.checkResult(cachedAnchorResults[c.attr("href")]);c.busy(false);Imagini.startedCalls[c.attr("href")]=null}return false});$(a).find("form.ajaxable").each(function(){$(this).ajaxForm({dataType:"json",beforeSubmit:Imagini.checkInput,success:Imagini.checkResult})});$(a).find(".imageFrame").each(function(){$(this).append('<div class="frame"></div>');var c=$(this).find("img");if(!c.attr("onerror")){c.attr("onerror","this.src='"+Imagini.skinImagePath+"icons/user.jpg';")}});$(a).find("a.fancybox").fancybox();var b=false;$(a).find("a[title]").each(function(){$(this).mouseover(function(f){var c=$(this);if(""===c.attr("title")&&""===c.attr("tip")){return}if(""!==c.attr("title")){c.attr("tip",c.attr("title"));c.removeAttr("title")}if(!$("body > #toolTip").attr("id")){var d=$('<div id="toolTip"></div>');$("body").append(d)}else{d=$("#toolTip")}d.stop().html(c.attr("tip"));d.css("top",f.pageY+20).css("left",f.pageX+10).css("opacity",0).css("width","auto").css("white-space","nowrap").show();if(d.width()>600){d.css("width",600).css("white-space","normal")}if(d.offset().left+d.width()>$("body").width()){d.css("left",f.pageX-d.width()-10)}if(d.offset().top+d.height()>$("body").height()){d.css("top",f.pageY-d.height()-20)}d.animate({opacity:1})});$(this).mouseout(function(c){$("#toolTip").hide()})});$(a).find(".hoverZoom").each(function(){if($(this).css("max-width")){$(this).hover(function(){if(!this.oldHeight){this.oldHeight=parseInt($(this).height());this.oldOffsetTop=$(this).offset().top;this.oldWidth=parseInt($(this).width());this.oldOffsetLeft=$(this).offset().left;$(this).css("position","absolute").css("top",this.oldOffsetTop).css("left",this.oldOffsetLeft)}maxWidth=parseInt($(this).css("max-width"));ot=this.oldOffsetTop-(maxWidth-this.oldWidth)/2;ol=this.oldOffsetLeft-(maxWidth-this.oldWidth)/2;$(this).css("z-index",2).animate({width:$(this).css("max-width"),left:ol,top:ot},50)},function(){$(this).css("z-index",0).animate({width:this.oldWidth,left:this.oldOffsetLeft,top:this.oldOffsetTop},50)})}})},checkInput:function(){},checkResult:function(result){var stopProcess=false;if(result.flashEvents&&result.flashEvents.length){for(var i in result.flashEvents){Imagini.addEvent(result.flashEvents[i]);if(parseInt(result.flashEvents[i].priority)<3){stopProcess=true}}if($("#flashEvents").children(".flashEvent").length){$("#flashEvents").slideDown("slow")}}if(!stopProcess){if(result.jsonDialog){Imagini.openDialog(result.jsonDialog)}if(result.flashCallbacks&&result.flashCallbacks.length){for(var i in result.flashCallbacks){eval(result.flashCallbacks[i])}}if(result.flashRedirect){document.location.assign(result.flashRedirect)}}},addEvent:function(b){var a=$('<div style="display: none;" class="flashEvent '+b.priorityName+'"><div class="flashTime">['+b.priorityName+"]"+b.timestamp+"</div>"+b.message+"</div>");$("#flashEvents").prepend(a);a.click(function(){$(this).hide("fast",function(){$(this).remove();if(!$("#flashEvents").children(".flashEvent").length){$("#flashEvents").hide("fast")}})});a.slideDown("slow").delay(2500).hide("fast").queue(function(){$("#flashEvents").slideUp("fast")})},showMessage:function(a){Imagini.addEvent({priorityName:"INFO",timestamp:new Date(),message:a});Imagini.checkEvents()},checkEvents:function(){if($("#flashEvents").children().length){$("#flashEvents").children().unbind("click").click(function(){$(this).hide("fast",function(){$(this).remove();if(!$("#flashEvents").children(".flashEvent").length){$("#flashEvents").hide("fast")}})});$("#flashEvents").slideDown("slow").delay(2500).slideUp("fast")}if(Imagini.flashCallbacks&&Imagini.flashCallbacks.length){for(var i in Imagini.flashCallbacks){eval(Imagini.flashCallbacks[i])}}},loadDialog:function(a){if(!cachedAnchorResults[a]){$.get(a,{},function(b){Imagini.checkResult(b);cachedAnchorResults[a]=b},"json")}else{Imagini.checkResult(cachedAnchorResults[a])}return false},openDialog:function(options){$("#modalOverlay").stop().css("opacity",0).show().animate({opacity:0.7},function(){$("#mainDialog").stop().css("opacity",0).html(options.content||"").css("top",$(window).height()/2-$("#mainDialog").height()/2).css("left",$(window).width()/2-$("#mainDialog").width()/2).show().click(function(e){if($(e.target).attr("id")==$(this).attr("id")){return false}}).animate({opacity:1},500,function(){$(this).find("input:first").focus();Imagini.bindEvents($(this));$(this).find(".closeDialogTrigger").click(function(e){if(options.confirm){if(confirm(options.confirm)){Imagini.closeDialog()}}else{Imagini.closeDialog()}});if(options.callback){eval(options.callback)}}).unbind("keypress").bind("keypress",function(e){var key=(window.event)?event.keyCode:e.keyCode;if(key==27){if(options.confirm){if(confirm(options.confirm)){Imagini.closeDialog()}}else{Imagini.closeDialog()}}})}).unbind("click").bind("click",function(){if(options.confirm){if(confirm(options.confirm)){Imagini.closeDialog()}}else{Imagini.closeDialog()}})},closeDialog:function(){if(Imagini.beforeCloseDialog){Imagini.beforeCloseDialog();Imagini.beforeCloseDialog=false}$("#modalOverlay").unbind("click");$("#mainDialog").animate({opacity:0},500,function(){$(this).html("");$("#modalOverlay").animate({opacity:0},500,function(){$(this).hide();if(Imagini.afterCloseDialog){Imagini.afterCloseDialog();Imagini.afterCloseDialog=false}})});return false},checkRegistrationFromFeedbackPage:function(){if(window.ownershipDetails){if(!window.ownershipDetails.userIsRegistered){if(window.user.saved){var a=window.user.name;a=a.replace("<br>","");var d=a.split(" ");var c=d[0];d.splice(0,1);var b=d.join(" ");$("input[name=first_name]").val(c);$("input[name=last_name]").val(b)}}}},showCaptcha:function(a){Recaptcha.create(a,"captchaDiv",{theme:"red"})},addGwalletPixel:function(a){var b=$('<img src="http://panel.gwallet.com/network-node/pixel/imagini/1x1.gif?sid='+a+'&payout=0.30" />');$("body").append(b)}};$(function(){setTimeout(Imagini.checkEvents,300);Imagini.bindEvents($("body"))});if(jQuery){(function(a){a.extend(a.fn,{busy:function(b){if(b==true){var c=a('<div class="busyModal"></div>');a(this).after(c);c.css("opacity",0).show().css("left",a(this).offset().left).css("top",a(this).offset().top).css("width",a(this).outerWidth()).css("height",a(this).outerHeight()).animate({opacity:0.5})}else{a(this).next(".busyModal").animate({opacity:0},500,function(){a(this).remove()})}},blink:function(b){a(this).animate({opacity:0},200,function(){a(this).animate({opacity:1},200,b)})}})})(jQuery)}var responses=new Object();var extradata=new Object();var responseimages=new Object();var demographics=new Object();var tStart=new Date();var modulename;var answer;var pageImpressionsSent=new Array();moduleStarted=false;var VDNA_setComplete=false;$(document).ready(function(){if(document.getElementById("c")){var d=$(document.body).find(".q");for(var b=0;b<d.length;b++){var c=$(d[b]).find("img");for(var a=0;a<c.length;a++){VDNA_QF.highlightImage(c[a],"init");$(c[a]).mouseover(function(){VDNA_QF.highlightImage(this,"over")});$(c[a]).mouseout(function(){VDNA_QF.highlightImage(this,"out")})}}VDNA_IQ.nextpage(null,"","")}});var VDNA_IQ=VDNA_IQ||{};VDNA_IQ={page:"",imageURLs:[],imageAssets:[],totalImages:0,imagesLoaded:0,moduleStarted:false,alreadyLoaded:[],ImageAsset:function(){this.image=null;this.onclick=null;this.targetDOMElement=null;this.page="";this.destroy=function(){this.image=null;this.onclick=null;this.targetDOMElement=null;this.page=""}},PageData:function(a){this.name=a;this.imageAssets=[];this.imagesLoaded=0;this.impression=false;this.sendImpression=function(){if(VDNA_IQ.page===this.name&&this.imagesLoaded===this.imageAssets.length){sendStatementEvent(this.name,"IMPRESSION")}}},resetImageLoader:function(){VDNA_IQ.imageURLs=[]},stopImageLoads:function(c){var a=VDNA_IQ.imageAssets[c];while(a.length){var b=a.shift();b.image.src="";b.destroy()}},loadPageImages:function(d,c){VDNA_IQ.resetImageLoader();if(d){if(typeof VDNA_IQ.alreadyLoaded[d]==="undefined"){var a=$("#page"+d).find("img");for(i=0;i<a.length;i++){if(a[i].src.indexOf("/images/load_small.gif")!=-1){VDNA_IQ.imageURLs.push(a[i])}}VDNA_IQ.totalImages=VDNA_IQ.imageURLs.length;VDNA_IQ.imageAssets[d]=new VDNA_IQ.PageData(d);for(j=0;j<VDNA_IQ.imageURLs.length;j++){var b=new VDNA_IQ.ImageAsset();VDNA_IQ.imageAssets[d].imageAssets.push(b);b.page=d;b.onclick=VDNA_IQ.imageURLs[j].parentNode.onclick;VDNA_IQ.imageURLs[j].parentNode.onclick=null;b.targetDOMElement=VDNA_IQ.imageURLs[j];b.image=new Image();b.image.onload=function(){var g=VDNA_IQ.imageAssets[this.name];g.imagesLoaded++;var f;for(var e=0;e<g.imageAssets.length;e++){if(g.imageAssets[e].image!=null&&typeof(g.imageAssets[e].image)=="object"){if(g.imageAssets[e].image.src===this.src){f=g.imageAssets[e];break}}}f.targetDOMElement.src=this.src;if(g.imagesLoaded===g.imageAssets.length){g.sendImpression();VDNA_IQ.addImageOnclicks(g)}};b.image.name=d;b.image.src=VDNA_IQ.imageURLs[j].parentNode.rel}VDNA_IQ.alreadyLoaded[d]=true}if(typeof(quiz_def[d]["successor"])!="undefined"&&quiz_def[d]["successor"]!=="finish"&&c!==false){VDNA_IQ.loadPageImages(quiz_def[d]["successor"],false)}return true}return false},addImageOnclicks:function(c){for(var a=0;a<c.imageAssets.length;a++){c.imageAssets[a].targetDOMElement.parentNode.onclick=function(){for(var f=0;f<c.imageAssets.length;f++){var e;if(c.imageAssets[f].targetDOMElement.parentNode===this){e=c.imageAssets[f];$("#page"+e.page).css("display","none");answer=e.onclick();responses[e.page]=answer;responseimages[e.page]=e.targetDOMElement.src;var b=$(e.targetDOMElement).parents("li").index()+1;var d=$("#page"+e.page).find("img").length;sendStatementEvent(e.page,"CLICK",answer,b,d);if(typeof(quiz_def[e.page][answer])!="undefined"){VDNA_IQ.page=quiz_def[e.page][answer]}else{VDNA_IQ.page=quiz_def[e.page].successor}VDNA_IQ.loadPageImages(VDNA_IQ.page);VDNA_IQ.nextpage("","",VDNA_IQ.page);break}}}}},nextpage:function(a,d,h){var p;var e;var k=h?false:true;if(k){for(p in quiz_def){$("#page"+p).css("display","block");VDNA_IQ.page=p;VDNA_IQ.loadPageImages(VDNA_IQ.page);break}}else{VDNA_IQ.imageAssets[VDNA_IQ.page].sendImpression();if(!VDNA_IQ.moduleStarted){VDNA_IQ.moduleStarted=true;sendModuleStartEvent()}$("#page"+h).css("display","block");if(h==="finish"){VDNA_QF.finishUp()}}var o=$("#page"+VDNA_IQ.page+" ul.ql");var l=$("#page"+VDNA_IQ.page+" ul.ql li");var n=5;var f=new Array();for(var e=3;e<=n;e++){f.push(e)}var q=l;var b=$(q).children("div:first");var g=156;for(var c=0;c<f.length;c++){if(($(q).size()>=1)&&($(q).size()<=n)){o.parent(".q").css("width",g*q.size())}if($(q).size()%f[c]===0){var m=parseInt(f[c]*g);o.parent(".q").css("width",m)}}}};var VDNA_QF=VDNA_QF||{};VDNA_QF={highlightImage:function(d,a){var c="#7ab20d";var b="#eee";if(a=="over"){$(d).animate({borderLeftColor:c,borderBottomColor:c,borderRightColor:c,borderTopColor:c},200)}else{if(a=="out"){$(d).animate({borderLeftColor:b,borderBottomColor:b,borderRightColor:b,borderTopColor:b},500)}else{VDNA_QF.highlightImage(d,"over");VDNA_QF.highlightImage(d,"out")}}},finishUp:function(){var a="";for(i in responses){a+="&choices["+i+"]="+responses[i]}for(i in quiz_def){if(a.indexOf("&choices["+i+"]")==-1&&i!="finish"){a+="&choices["+i+"]=no_answer"}}$.post(quiz_url,a,function(b){Imagini.checkResult(b);sendModuleCompleteEvent(b.responseId,false)},"json")}};Imagini.Facebook={postAuthenticate:function(a){FB.Connect.showPermissionDialog("email,publish_stream",function(b){if(a=="facebookConnect"){document.location.reload()}else{window.location="/"}})},inviteFriends:function(d,b,c,a){FB.Connect.showPermissionDialog("email,publish_stream",function(e){FB_RequireFeatures(["XFBML","Api","Connect"],function(){FB.Connect.requireSession(function(){var f='<fb:request-form action="'+a+'" method="POST" invite="true" type="Youniverse" content="'+b+". &lt;fb:req-choice url='"+a+"' label='"+c+'\' /&gt;"><fb:multi-friend-selector showborder="false" rows="4" actiontext="'+d+'" /></fb:request-form>';var g=new FB.UI.FBMLPopupDialog(d,f);g.setContentWidth(760);g.setContentHeight(510);g.show()})})})}};if(!this.JSON){JSON={}}(function(){function d(f){return f<10?"0"+f:f}if(typeof Date.prototype.toJSON!=="function"){Date.prototype.toJSON=function(f){return this.getUTCFullYear()+"-"+d(this.getUTCMonth()+1)+"-"+d(this.getUTCDate())+"T"+d(this.getUTCHours())+":"+d(this.getUTCMinutes())+":"+d(this.getUTCSeconds())+"Z"};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(f){return this.valueOf()}}var c=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,h,b,l={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},k;function a(f){g.lastIndex=0;return g.test(f)?'"'+f.replace(g,function(m){var n=l[m];return typeof n==="string"?n:"\\u"+("0000"+m.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+f+'"'}function e(s,p){var n,m,t,f,q=h,o,r=p[s];if(r&&typeof r==="object"&&typeof r.toJSON==="function"){r=r.toJSON(s)}if(typeof k==="function"){r=k.call(p,s,r)}switch(typeof r){case"string":return a(r);case"number":return isFinite(r)?String(r):"null";case"boolean":case"null":return String(r);case"object":if(!r){return"null"}h+=b;o=[];if(Object.prototype.toString.apply(r)==="[object Array]"){f=r.length;for(n=0;n<f;n+=1){o[n]=e(n,r)||"null"}t=o.length===0?"[]":h?"[\n"+h+o.join(",\n"+h)+"\n"+q+"]":"["+o.join(",")+"]";h=q;return t}if(k&&typeof k==="object"){f=k.length;for(n=0;n<f;n+=1){m=k[n];if(typeof m==="string"){t=e(m,r);if(t){o.push(a(m)+(h?": ":":")+t)}}}}else{for(m in r){if(Object.hasOwnProperty.call(r,m)){t=e(m,r);if(t){o.push(a(m)+(h?": ":":")+t)}}}}t=o.length===0?"{}":h?"{\n"+h+o.join(",\n"+h)+"\n"+q+"}":"{"+o.join(",")+"}";h=q;return t}}if(typeof JSON.stringify!=="function"){JSON.stringify=function(o,m,n){var f;h="";b="";if(typeof n==="number"){for(f=0;f<n;f+=1){b+=" "}}else{if(typeof n==="string"){b=n}}k=m;if(m&&typeof m!=="function"&&(typeof m!=="object"||typeof m.length!=="number")){throw new Error("JSON.stringify")}return e("",{"":o})}}}());var VDNA_urls={live:"http://gateway-lite.visualdna.com/vdna_api.php",staging:"http://gateway-lite.staging.visualdna.com/vdna_api.php",dt:"http://gateway-lite.deploytest.visualdna.com/vdna_api.php",vm:"http://gateway-lite.vm.visualdna.com/vdna_api.php"};var VDNA_url=VDNA_urls.live;var VDNA_enableVDNABank=true;var VDNA_cookieName="vdnaUserId";var VDNA_permCookieName="vdnaUserPermission";var VDNA_userAskedCookieName="vdnaUserAskedAboutPermission";var xmlhttp;var VDNA_userPermission;var VDNA_lastUserResponse;var VDNA_userProfile;var VDNA_userFeedback;var VDNA_userID;var VDNA_safariNewUser=false;var VDNA_safariUpdateCookie=false;var VDNA_error="";var VDNA_answer="";var VDNA_functionNameCalled=new Array();function VDNA_GetUserID(){if(VDNA_LocalCookieExists(VDNA_cookieName)){VDNA_userID=VDNA_GetInfoFromCookie(VDNA_cookieName);return VDNA_userID}else{if(VDNA_enableRemoteCookies){if(VDNA_RequestPeriodOver()){VDNA_GetUserIDRemote()}else{return 0}}else{if(!VDNA_LocalCookieExists(VDNA_permCookieName)){VDNA_SetUpInfoCookie(VDNA_permCookieName,"true")}}}}function VDNA_getClientPermission(){if(VDNA_functionNameCalled.length>0&&!VDNA_LocalCookieExists(VDNA_userAskedCookieName)&&VDNA_enableVDNABank==true){return false}if(!VDNA_LocalCookieExists(VDNA_userAskedCookieName)&&VDNA_enableVDNABank==true&&VDNA_LocalCookieExists(VDNA_cookieName)){callback="VDNA_processGetClientPermission";var c=VDNA_url+"?method=api.soa.us.getClientPermission&param1="+VDNA_config.userID+"&api_key="+VDNA_apiKey+"&sig="+VDNA_hash+"&callback="+callback+"&format=json&v=1";var a=document.getElementsByTagName("head")[0];var b=document.createElement("script");b.type="text/javascript";b.src=c;a.appendChild(b);return false}return true}function VDNA_processGetClientPermission(jsonObj){if(jsonObj["@attributes"].stat=="ok"){if(jsonObj.userPermission["@attributes"].permission=="0"){VDNA_show_modal()}else{if(jsonObj.userPermission["@attributes"].permission=="1"){VDNA_SetUpInfoCookie(VDNA_userAskedCookieName,"true");if(VDNA_functionNameCalled.length>0){for(var i=0;i<VDNA_functionNameCalled.length;i++){eval(VDNA_functionNameCalled[i])}VDNA_functionNameCalled=new Array()}}}}else{if(jsonObj["@attributes"].stat=="fail"){alert(jsonObj.err["@attributes"].msg)}}}function VDNA_processUserResponse(){if(VDNA_answer!=""){switch(VDNA_answer){case"true":VDNA_SetUpInfoCookie(VDNA_userAskedCookieName,"true");VDNA_setClientPermission(1);break;case"false":VDNA_SetUpInfoCookie(VDNA_userAskedCookieName,"false");break;default:VDNA_SetUpInfoCookie(VDNA_userAskedCookieName,"24h");break}}if(VDNA_functionNameCalled.length>0){for(var i=0;i<VDNA_functionNameCalled.length;i++){eval(VDNA_functionNameCalled[i])}VDNA_functionNameCalled=new Array()}}function VDNA_setClientPermission(d){callback="VDNA_processSetClientPermission";var c=VDNA_url+"?method=api.soa.us.setClientPermission&param1="+VDNA_config.userID+"&param2="+d+"&api_key="+VDNA_apiKey+"&sig="+VDNA_hash+"&format=json&v=1&callback="+callback;var a=document.getElementsByTagName("head")[0];var b=document.createElement("script");b.type="text/javascript";b.src=c;a.appendChild(b)}function VDNA_processSetClientPermission(a){if(a["@attributes"].stat=="fail"){alert(a.err["@attributes"].msg)}}function isInt(a){var b=parseInt(a);if(isNaN(b)){return false}return a==b&&a.toString()==b.toString()}function VDNA_getCookieDomain(){var d=document.domain;var a=d.split(".");var c=true;for(var b=0;b<a.length;b++){if(!isInt(a[b])){var c=false}}if(!c){d="."+a[a.length-2]+"."+a[a.length-1]}return d}function VDNA_LocalCookieExists(a){if(document.cookie.length>0){c_start=document.cookie.indexOf(a+"=");if(c_start!=-1){return true}}return false}function VDNA_GetInfoFromCookie(a){if(document.cookie.length>0){c_start=document.cookie.indexOf(a+"=");if(c_start!=-1){c_start=c_start+a.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1){c_end=document.cookie.length}return unescape(document.cookie.substring(c_start,c_end))}}return false}function VDNA_SetUpInfoCookie(b,f){var e=1000*60*60*24*356*10;if(b=="vdnaTimestamp"){f=Math.round(new Date().getTime()/1000)}if(b==VDNA_cookieName||f=="24h"){if(f==0){return false}e=1000*60*60*24}var c=VDNA_getCookieDomain();var a=new Date();a.setTime(a.getTime());var d=new Date(a.getTime()+e);document.cookie=b+"="+escape(f)+";expires="+d.toGMTString()+";path=/;domain="+c}function VDNA_DeleteLocalCookie(a){var c=VDNA_getCookieDomain();var b="Thu, 01-Jan-1970 00:00:01 GMT";document.cookie=a+"=0;expires="+b+";path=/;domain="+c}function VDNA_RequestPeriodOver(){var b=VDNA_GetInfoFromCookie("vdnaTimestamp");if(!b){return true}var a=Math.round(new Date().getTime()/1000);if(a-b>60*60*24){return true}return false}function VDNA_GetUserIDRemote(){if((VDNA_userID===false||VDNA_userID==undefined||VDNA_userID=="false")&&VDNA_error==""){var a=document.getElementsByTagName("head")[0];var b=document.createElement("script");b.type="text/javascript";b.src=VDNA_url+"?format=json&method=api.vdna.getRemoteCookie&v=1&api_key="+VDNA_apiKey+"&sig="+VDNA_hash+"&callback=VDNA_GetUserIDRemoteValue";a.appendChild(b);setTimeout("VDNA_GetUserIDRemote()",300)}else{if(VDNA_error!=""){alert(VDNA_error);VDNA_error=""}else{VDNA_SetUpInfoCookie("vdnaTimestamp","");VDNA_SetUpInfoCookie(VDNA_cookieName,VDNA_userID);VDNA_SetUpInfoCookie(VDNA_permCookieName,VDNA_userPermission)}}}function VDNA_RefreshCookieValues(){var a=document.getElementsByTagName("head")[0];var b=document.createElement("script");b.type="text/javascript";b.src=VDNA_url+"?format=json&method=api.vdna.getRemoteCookie&v=1&api_key="+VDNA_apiKey+"&sig="+VDNA_hash+"&callback=VDNA_GetUserIDRemoteValue";a.appendChild(b)}function VDNA_GetUserIDRemoteValue(a){if(a["@attributes"].stat=="fail"){VDNA_error=a.err["@attributes"].msg;alert(VDNA_error)}else{VDNA_userID=a.data.vdnaUserId["@value"];VDNA_config.userID=VDNA_userID;VDNA_userPermission=a.data.vdnaUserPerm["@value"];VDNA_SetUpInfoCookie("vdnaTimestamp","");VDNA_SetUpInfoCookie(VDNA_permCookieName,VDNA_userPermission);if(VDNA_userID==0){VDNA_DeleteLocalCookie(VDNA_cookieName)}else{VDNA_SetUpInfoCookie(VDNA_cookieName,VDNA_userID)}}}function VDNA_GetLastResponse(d,f){if(!VDNA_getClientPermission()){var e="VDNA_GetLastResponse("+d+', "'+f+'")';VDNA_functionNameCalled[VDNA_functionNameCalled.length]=e;return false}if(f==null){f="VDNA_processLastUserResponse"}var c=VDNA_url+"?method=api.soa.us.getLastUserResponse&param1="+VDNA_config.userID+"&param2="+d+"&api_key="+VDNA_apiKey+"&sig="+VDNA_hash+"&callback="+f+"&format=json&v=1";var a=document.getElementsByTagName("head")[0];var b=document.createElement("script");b.type="text/javascript";b.src=c;a.appendChild(b)}function VDNA_GetUserResponse(b,f){if(!VDNA_getClientPermission()){var e="VDNA_GetUserResponse("+b+', "'+f+'")';VDNA_functionNameCalled[VDNA_functionNameCalled.length]=e;return false}if(f==null){f="VDNA_processResponse"}var d=VDNA_url+"?method=api.soa.us.getUserFullResponse&param1="+VDNA_config.userID+"&param2="+b+"&api_key="+VDNA_apiKey+"&sig="+VDNA_hash+"&callback="+f+"&format=json&v=1";var a=document.getElementsByTagName("head")[0];var c=document.createElement("script");c.type="text/javascript";c.src=d;a.appendChild(c)}function VDNA_GetSharedResponse(b,f){if(!VDNA_getClientPermission()){var e="VDNA_GetSharedResponse("+b+', "'+f+'")';VDNA_functionNameCalled[VDNA_functionNameCalled.length]=e;return false}if(f==null){f="VDNA_processSharedResponse"}var d=VDNA_url+"?method=api.soa.us.getFullResponse&param1="+b+"&api_key="+VDNA_apiKey+"&sig="+VDNA_hash+"&callback="+f+"&format=json&v=1";var a=document.getElementsByTagName("head")[0];var c=document.createElement("script");c.type="text/javascript";c.src=d;a.appendChild(c)}function VDNA_GetUserProfile(e){if(!VDNA_getClientPermission()){var d='VDNA_GetUserProfile("'+e+'")';VDNA_functionNameCalled[VDNA_functionNameCalled.length]=d;return false}if(e==null){e="VDNA_processUserProfile"}var c=VDNA_url+"?method=api.soa.us.getUserProfile&param1="+VDNA_config.userID+"&api_key="+VDNA_apiKey+"&sig="+VDNA_hash+"&callback="+e+"&format=json&v=1";var a=document.getElementsByTagName("head")[0];var b=document.createElement("script");b.type="text/javascript";b.src=c;a.appendChild(b)}function VDNA_GetUserFeedback(b,e,g){if(!VDNA_getClientPermission()){var f="VDNA_GetUserFeedback("+b+", "+e+', "'+g+'")';VDNA_functionNameCalled[VDNA_functionNameCalled.length]=f;return false}if(g==null){g="VDNA_processUserFeedback"}var d=VDNA_url+"?method=api.soa.us.getUserFeedback&param1="+b+"&param2="+escape("<applicationData></applicationData>")+"&param3="+e+"&api_key="+VDNA_apiKey+"&sig="+VDNA_hash+"&callback="+g+"&format=json&v=1";var a=document.getElementsByTagName("head")[0];var c=document.createElement("script");c.type="text/javascript";c.src=d;a.appendChild(c)}function VDNA_FlashGetUserID(b){VDNA_SetUpInfoCookie(VDNA_cookieName,b);VDNA_config.userID=b;VDNA_userID=b;if(/Safari/.test(navigator.userAgent)){VDNA_safariNewUser=true}if(b=="OPT_OUT"){var d=VDNA_url+"?format=json&method=api.vdna.setRemoteCookie&v=1&param1=OPT_OUT&api_key="+VDNA_apiKey+"&sig="+VDNA_hash+"&callback=VDNA_SetCompleteRemoteValue"}else{var d=VDNA_url+"?format=json&method=api.vdna.setRemoteCookie&v=1&param1="+b+"&param2=%22true%22&api_key="+VDNA_apiKey+"&sig="+VDNA_hash+"&callback=VDNA_SetCompleteRemoteValue"}var a=document.getElementsByTagName("head")[0];var c=document.createElement("script");c.type="text/javascript";c.src=d;a.appendChild(c)}function VDNA_Redirect(a,b){VDNA_userPerm=VDNA_GetInfoFromCookie(VDNA_permCookieName);if((VDNA_safariNewUser==true&&VDNA_safariUpdateCookie==false)){var c=VDNA_url+"?format=json&method=api.vdna.setRemoteCookie&v=1&param1="+VDNA_userID+"&param2=&param3="+escape(a)+"&api_key="+VDNA_apiKey+"&sig="+VDNA_hash;document.location.assign(c);return false}if(VDNA_safariUpdateCookie==true){if(VDNA_userPerm=="true"){var c=VDNA_url+"?format=json&method=api.vdna.setRemoteCookie&v=1&param1=&param2=%22"+VDNA_userPerm+"%22&param3="+escape(a)+"&api_key="+VDNA_apiKey+"&sig="+VDNA_hash;document.location.assign(c)}if(VDNA_userPerm=="false"){var c=VDNA_url+"?format=json&method=api.vdna.deleteRemoteCookie&v=1&param1="+escape(a)+"&api_key="+VDNA_apiKey+"&sig="+VDNA_hash;document.location.assign(c)}return false}document.location.assign(a)}function VDNA_WaitAndRedirect(a){if(VDNA_setComplete!==true){setTimeout('VDNA_WaitAndRedirect("'+a+'");',100);return false}return VDNA_Redirect(a)}function VDNA_SetCompleteRemoteValue(a){if(a["@attributes"].stat=="fail"&&a.err["@attributes"].msg!="No vdnaUserId cookie set"){alert(a.err["@attributes"].msg)}else{VDNA_setComplete=true}}function VDNA_FlashSetVDNA(a){if(/Safari/.test(navigator.userAgent)){VDNA_safariUpdateCookie=true}if(a=="false"){var c="Saving your VisualDNA is recommended, as it allows you to have a more personalised web experience.\n\nWe respect your privacy and your VisualDNA is under your control at all times - simply go to my.visualdna.com to opt-out or manage your VisualDNA.\n\nAre you sure you want to change this setting?";var b=confirm(c);if(b){VDNA_FlashGetUserID("OPT_OUT");VDNA_FlashGetUserPerm("false");return"false"}return"true"}else{if(a=="true"){VDNA_FlashGetUserPerm("true");if(VDNA_FlashSendUserID()=="OPT_OUT"){VDNA_DeleteCookie()}return"true"}}}function VDNA_DeleteCookie(){VDNA_DeleteLocalCookie(VDNA_cookieName);VDNA_DeleteLocalCookie(VDNA_userAskedCookieName);if(!/Safari/.test(navigator.userAgent)){var a=document.getElementsByTagName("head")[0];var b=document.createElement("script");b.type="text/javascript";b.src=VDNA_url+"?format=json&method=api.vdna.deleteRemoteCookie&v=1&api_key="+VDNA_apiKey+"&sig="+VDNA_hash+"&callback=VDNA_SetCompleteRemoteValue";a.appendChild(b)}}function VDNA_FlashSendUserID(){VDNA_userID=VDNA_GetInfoFromCookie(VDNA_cookieName);return VDNA_userID}function VDNA_FlashGetUserPerm(b){VDNA_SetUpInfoCookie(VDNA_permCookieName,b);var a=document.getElementsByTagName("head")[0];var c=document.createElement("script");c.type="text/javascript";c.src=VDNA_url+"?format=json&method=api.vdna.setRemoteCookie&v=1&param1=&param2=%22"+b+"%22&api_key="+VDNA_apiKey+"&sig="+VDNA_hash+"&callback=VDNA_SetCompleteRemoteValue";a.appendChild(c)}function VDNA_FlashSendUserPerm(){VDNA_userPerm=VDNA_GetInfoFromCookie(VDNA_permCookieName);return VDNA_userPerm}function VDNA_FlashHasExternalInterface(){return true}function VDNA_modalClose(){x=document.getElementById("permModal");x.parentNode.removeChild(x);x=document.getElementById("modalDataContainer");x.parentNode.removeChild(x);document.body.style.overflow="auto"}function VDNA_modalClose(){x=document.getElementById("permModal");x.parentNode.removeChild(x);x=document.getElementById("modalDataContainer");x.parentNode.removeChild(x);document.body.style.overflow="auto"}function VDNA_show_modal(){var g=(VDNA_getWindowWidth()-400)/2+"px",e=VDNA_getCookieDomain(),d=Math.round(new Date().getTime()/1000);VDNA_answer="true";var f=document.createElement("div");f.setAttribute("id","modalDataContainer");f.style.fontFamily='font-family: Arial, "Helvetica Neue", Helvetica, sans-serif';f.style.fontSize="15px";f.style.lineHeight="18px";f.style.textAlign="left";f.style.color="#999999";f.style.backgroundColor="#eeeeee";f.style.position="absolute";f.style.margin="0";f.style.padding="0";f.style.fontWeight="normal";f.style.fontStyle="normal";f.style.textTransform="none";f.style.left=g;f.style.top="90px";f.style.zIndex=1001;f.style.width="406px";var a=document.createElement("div");a.style.zIndex=1001;a.style.borderColor="#a9a9a9";a.style.borderWidth="6px";a.style.borderStyle="solid";var c=document.createElement("div");c.style.padding="25px 18px 13px 18px";c.style.zIndex=1001;c.innerHTML='<p style="font-family: Arial, \'Helvetica Neue\', Helvetica, sans-serif; font-size: 15px; line-height: 18px; text-align: left; color: #999; margin: 2px 0 17px 0; padding: 0 40px; font-weight: normal; font-style: normal; text-transform: none;"><a href="http://my.visualdna.com" target="_blank" title="visualdna.com" style="font-family: Arial, \'Helvetica Neue\', Helvetica, sans-serif; font-size: 15px; line-height: 18px; color: #000000; font-weight: bold; text-decoration: none;">'+e.substr(1,e.length)+'</a> wants permission to access your VisualDNA and give you a more personalized experience.</p><ul style="list-style: none; list-style-image: none; margin: 0; padding: 0 40px;"><li style="list-style: none; list-style-image: none; margin: 0 0 6px 0; padding: 0;"><input onclick="VDNA_answer = this.value;" type="radio" name="permission" checked="checked" value="true" id="vdnaPermAllow" /> <label for="vdnaPermAllow" style="font-family: Arial, \'Helvetica Neue\', Helvetica, sans-serif; font-size: 15px; line-height: 18px; text-align: left; color: #000; margin: 0; padding: 0; font-weight: bold; font-style: normal; text-transform: none;">Allow</label></li><li style="list-style: none; list-style-image: none; margin: 0 0 6px 0; padding: 0;"><input onclick="VDNA_answer = this.value;" type="radio" name="permission" value="'+d+'" id="vdnaPermDontAllow" /> <label for="vdnaPermDontAllow" style="font-family: Arial, \'Helvetica Neue\', Helvetica, sans-serif; font-size: 15px; line-height: 18px; text-align: left; color: #999; margin: 0; padding: 0; font-weight: normal; font-style: normal; text-transform: none;">Don\'t Allow</label></li><li style="list-style: none; list-style-image: none; margin: 0 0 18px 0; padding: 0;"><input onclick="VDNA_answer = this.value;" type="radio" name="permission" value="false" id="vdnaPermNeverAllow" /> <label for="vdnaPermNeverAllow" style="font-family: Arial, \'Helvetica Neue\', Helvetica, sans-serif; font-size: 15px; line-height: 18px; text-align: left; color: #999; margin: 0; padding: 0; font-weight: normal; font-style: normal; text-transform: none;">Never Allow</label></li></ul><input type="hidden" value="true" id="answer" name="answer" /><input type="image" alt="Continue" title="Continue" src="http://media.youniverse.com/vdnaPermissionsI.gif" style="padding-left: 40px;" onclick="VDNA_processUserResponse(); VDNA_modalClose();" /><p style="font-family: Arial, \'Helvetica Neue\', Helvetica, sans-serif; font-size: 12px; line-height: 18px; text-align: left; color: #999; margin: 20px 0 0 0; padding: 0; font-weight: normal; font-style: normal; text-transform: none;">See your VisualDNA and set preferences on <a href="http://my.visualdna.com" target="_blank" title="my.visualdna.com" style="font-family: Arial, \'Helvetica Neue\', Helvetica, sans-serif; font-size: 12px; line-height: 18px; color: #0568ff; font-weight: normal; text-decoration: none;">my.visualdna.com</a></p><div style="text-align: right; margin: 8px 0 0 0;"><a href="http://www.visualdna.com" target="_blank" title="Visit visualdna.com"><img src="http://media.youniverse.com/vdnaPermissionsII.gif" alt="VisualDNA" style="border: 0;" /></a></div>';var b=document.createElement("div");b.id="permModal";b.style.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";b.style.backgroundColor="#333";b.style.position="absolute";b.style.top="0";b.style.left="0";b.style.height="100%";b.style.width="100%";b.style.opacity=".2";b.style.zIndex="1000";document.body.style.overflow="hidden";document.body.appendChild(b);a.appendChild(c);f.appendChild(a);document.body.appendChild(f);b.onclick=VDNA_modalClose}function VDNA_getWindowWidth(){var a=0;if(self.innerHeight){a=self.innerWidth}else{if(document.documentElement&&document.documentElement.clientHeight){a=document.documentElement.clientWidth}else{if(document.body){a=document.body.clientWidth}}}return a};
