// *************************************************************************
// *                                                                       *
// * (c) 2008-2011 Wolf Software Limited <support@wolf-software.com>       *
// * All Rights Reserved.                                                  *
// *                                                                       *
// * This program is free software: you can redistribute it and/or modify  *
// * it under the terms of the GNU General Public License as published by  *
// * the Free Software Foundation, either version 3 of the License, or     *
// * (at your option) any later version.                                   *
// *                                                                       *
// * This program is distributed in the hope that it will be useful,       *
// * but WITHOUT ANY WARRANTY; without even the implied warranty of        *
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
// * GNU General Public License for more details.                          *
// *                                                                       *
// * You should have received a copy of the GNU General Public License     *
// * along with this program.  If not, see <http://www.gnu.org/licenses/>. *
// *                                                                       *
// *************************************************************************

(function(a){a.jpecrga=function(c){var d={gaKey:"",backgroundColor:"#ffffe1",permanentBackgroundColor:"#bbffbb",borderColor:"#444",textColor:"#444",message:'<a href="http://www.wolf-software.com" target=_blank><img style="border: none; vertical-align: middle; margin-right: 5px; margin-top: -2px;" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEgAACxIB0t1+/AAAAAd0SU1FB9sFFBMiBWoOpnIAAAF3SURBVDjLrVIxS5xBFJw385YYD5FrrCyUELEQTCSSwkQ4sbGJXf6BqIWVv8JfoGVaIf4AGysDgjYBuxQhYm3lVZ77bPZk7/MOLPJg2d3Z92bn7Q4wJEhOk/xWQVMk94bmNoGUEnLO9wD+9DFJcwCu8NqQ9EtSkFw3swl3z+4eJD+MVGBmNf6ZJMxs18wWAfQPV0YSRARIrpVtF0AAyAD+VpdcmNmqmaWBC8umLemU5CeSm5LOSb4vj7pFchOASbol+XNY3wcppZB0V+OtVqvO2XL3cPcAMNv8hZmipg3gbR/sdruo2hzrS5f00FTw3d1D0k2F7Ug6MrPlQv7O3R8lnWCEgeYBvCnrfXePlFIU4i+N3JEe2Jb0rxTnQpALyTGA8ZTSy7pSfJhSiuZw91wpuQMw1vTBY5kXyv8PhJWXM7Mws7akjeezRl8dkme1SSJiwKkRgV6vNwHg/gVBSeyQ/BoR1znn34V4ycw+ApiMiB8550v8r3gCZahfg3Sdbr4AAAAASUVORK5CYII=" alt=" " /></a> Do you consent to receiving Google Analytics cookies? We use these to aid in improving and maintaining our website. We will remember this preference until you close your browser.',permanentMessage:"Would you like us to save your preference permanently? We will remember this preference using a cookie on your machine.",moreInfo:'<p><b>Google Analytics</b></p><br /><p>This site uses Google Analytics, a web analytics service provided by Google, Inc. Google Analytics sets number of cookies (default is 4) in order to evaluate your use of the site and compile reports for us on activity on the site.</p><br /><p>Google stores the information collected by the cookie on servers in the United States. Google may also transfer this information to third parties where required to do so by law, or where such third parties process the information on Google&apos;s behalf. Google will not associate your IP address with any other data held by Google.</p><br /><p>Google Inc are members of the US Safe Harbor Scheme. This scheme allows the transfer of data from within the EEA to countries that are outside of the EEA without having to enter into a specific data transfer agreement. Companies that sign up to the scheme are deemed to provide adequate protection for personal data transmitted from Europe. Google Inc’s registration is at <a href="http://safeharbor.export.gov/companyinfo.aspx?id=10543" target=_blank>http://safeharbor.export.gov/companyinfo.aspx?id=10543</a>.</p><br /><p>For more information on the cookies set by Google Analytics please go to: <a href="http://code.google.com/apis/analytics/docs/concepts/gaConceptsCookies.html" target=_blank>http://code.google.com/apis/analytics/docs/concepts/gaConceptsCookies.html</a>.</p><br /><p>Google has also created their own opt-out plugin which you can get from: <a href="http://tools.google.com/dlpage/gaoptout" target=_blank>http://tools.google.com/dlpage/gaoptout</a>.</p><br /><p>In addition to the cookies set by Google Analytics, this plugin will create a session based cookie (which will expire when you close your browser) containing a single "true" or "false" value, reflecting your choice.</p><br /><p>Download the Wolf Software Plugin: <a href="http://www.wolf-software.com/Downloads/jpecrga/" target=_blank>Download Link</a>.</p>',permanentMoreInfo:'<p><b>Permanent Preference</b></p><br /><p>In order for us to store your preference permanently we will need to set a cookie. This cookie will only contain a "true" or "false" value and nothing more. It is only used to store your preference for this site. Storing your preference permanently will simply stop you being asked this question each time you visit the site but will not effect your ability to use it.</p>',noConsentCallback:null};var c=a.extend(d,c);if(!(c.gaKey)||!(c.gaKey.length)){alert("Missing GA Key!");return}b();function b(){var j="WS_pecr-ga_cookie";var B="WS_pecr-ga_cookie_perm";var F=P();var o=E();var g=function(){v()};var s=function(){O()};var t=function(){h()};var m=function(){x()};var f=c.backgroundColor;var H=c.permanentBackgroundColor;var D=c.borderColor;var N=c.textColor;var l="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAABh0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjA1G8PgXAAAAmxJREFUOE+1kVtIk2EYxz+bVEwT8RQlSCO0ssT7rtLUufCmSwfGml1kWmDabrsSujCjibYD+ybT2efcN+cWOdcOanPNdJ4Hlh1ojm+Vp06278L897o7QUwveuEHD7w8v+d53z9F/a9D6+gEm93e2NLySExmJBx4jsHQKfV6tFssy6wWF18WHUigVquTrf22JW7pPEKzN6BsbTMSQeK+JWazuSk4fh+bv4/g10oG3C7rpkwmu7QvgVarPe3xOPj5yUK0Pq6ATlOKdzNSGLsZPxEc/afE5fJYPizcRnD0AurrG9BwV4bvi3mYHmPR2Hivek8BTdMl83PurQ3uDKZ8BZBKq3D9mgTfQrl47yuD1zscFolE6btK2tvbBT6fPxRZqMRGOB+TnnwUFZVCXlWEtWA2lkfTEPIr0dz88MGusTIMUzcX1G/9WDyF1ZlsBNgspKamofJqIaKDieCeC/C2NxNet+tnebnk3I4tSGwZTqdz5ePoWXz2J4EbScKMRYis4ydwp/oiODuFiIXCUu8hTPTdhEqlNu2IlWUtbWMv6hB9SZqHhOBcR8A5BHjadAwBnRARlkK4R4BP3YfxpiMJzmc9f+RyeUl8C41GU2C3dm1GRn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wXOmwOQyPUIYNVjeXQj/FhSrNklw+oYEeoaNBDwyqKJ3i7tubwKIxZHtmLOhsuYGVQPzwA+4nPa0NPrAPugDN7bpQhOvILQRA3WJ1xFZJoCl8hmV0Yqm07olCImX6QaWxAmwDTGRcxYx8PskDoExIrGr8BMV1PidmxM6URYcjfo7E4cKzVSu9daqT+YScTFxXl0GnSGlCNiuK0sx3T6ecwN5qGwSodBhx0CiR3BCWaEJFBvFNuPyBQ9muTtyNrLyfpjphap0Een63gak14HT98SLAgT4lCRAabuG8ivsMJ/Vz98oh0Ii+uCWNaHyvJiDSWe95cbNW0kQ61RPyw424zwRD4CWWJsTNJiHcuEUEq4L88CqdRAiYv0Hh7Eyn8WVEl+7hK5lKwhRZIRsukqhBIzyKYeNIjaxoQXau5ncZN/uo/2v2r8M57MjqGVFhyOKTx5mHv0SObe+Fgmi5r0ppr7RPEPApH9JSxg5AoAAAAASUVORK5CYII=";var C=0;var L=false;var k="";if(o!=null){F=o}if(F==null){var Q=a("<div />");var e=a('<img src="'+l+'" alt=" " />');var I=a("<p>"+c.message+' <a href="javascript:void(0);">More Info</a></p>');var n=a("<div />");var y=a('<input type="submit" name="yes" value="Yes" />');var K=a('<input type="submit" name="no" value="No" />');var q=a("<div>"+c.moreInfo+"</div>");Q.css("background-color",f);Q.css("color",N);Q.css("position","fixed");Q.css("top","0px");Q.css("left","0px");Q.css("right","0px");Q.css("padding","7px 120px 7px 36px");Q.css("vertical-align","middle");Q.css("border-bottom","1px solid "+D);Q.css("font-size","12px");Q.css("font-family","Arial, Helvetica, Sans-Serif");Q.css("z-index","9999");Q.css("box-shadow","0px 0px 5px #000");e.css("position","absolute");e.css("top","6px");e.css("left","10px");I.css("margin","0px");I.css("padding","0px");I.css("line-height","16px");I.css("font-size","1.0em");n.css("position","absolute");n.css("top","4px");n.css("right","10px");n.css("width","100px");y.css("margin-right","10px");y.css("font-size","1.0em");K.css("font-size","1.0em");q.css("background-color",f);q.css("color",N);q.css("position","fixed");q.css("left","20px");q.css("right","20px");q.css("padding","7px 10px 7px 10px");q.css("vertical-align","middle");q.css("border","1px solid "+D);q.css("border-top","none");q.css("font-size","12px");q.css("font-family","Arial, Helvetica, Sans-Serif");q.css("z-index","9998");q.css("display","none");q.css("border-radius","0px 0px 10px 10px");q.css("-moz-border-radius","0px 0px 10px 10px");q.css("box-shadow","0px 0px 5px #000");n.append(y);n.append(K);Q.append(I);Q.append(e);Q.append(n);a("body").append(Q);a("body").append(q);var A=Q.height();Q.css("display","none");Q.fadeIn(400);r();y.click(function(){R();if(C==0){k=true;g();w()}else{t();i()}});K.click(function(){R();if(C==0){k=false;s();if(c.noConsentCallback!=null){c.noConsentCallback()}w()}else{m();i()}});function w(){Q.fadeOut(200,function(){Q.css("background-color",H);I.html(c.permanentMessage+' <a href="#">More Info</a>');e.attr("src",G);q.html(c.permanentMoreInfo);r();Q.fadeIn(200)});C++}function i(){Q.fadeOut(400,function(){Q.remove()})}}else{if(F==true){J()}}function P(){var S=z(j);if(S==="true"){S=true}else{if(S==="false"){S=false}}return S}function E(){var S=z(B);if(S==="true"){S=true}else{if(S==="false"){S=false}}return S}function v(){M(j,k);J()}function O(){M(j,k)}function h(){M(B,k,365)}function x(){}function M(U,V,W){if(W){var T=new Date();T.setTime(T.getTime()+(W*24*60*60*1000));var S=";expires="+T.toGMTString()}else{var S=""}document.cookie=U+"="+V+S+"; path=/"}function z(T){var V=T+"=";var S=document.cookie.split(";");for(var U=0;U<S.length;U++){var W=S[U];while(W.charAt(0)==" "){W=W.substring(1,W.length)}if(W.indexOf(V)==0){return W.substring(V.length,W.length)}}return null}function r(){q.find("p").css("margin","0px");q.find("p").css("padding","0px");q.find("p").css("line-height","16px");q.find("p").css("font-size","1.0em");I.find("a").click(function(){if(q.is(":visible")){R()}else{u()}})}function u(){q.css("top",Q.outerHeight());q.fadeIn(400);return false}function R(){q.fadeOut(400);return false}function p(){a.pageTracker=_gat._getTracker(c.gaKey);a.pageTracker._initData();a.pageTracker._trackPageview()}function J(){if(!L){try{var T=(location.href.indexOf("https")==0?"https://ssl":"http://www");T+=".google-analytics.com/ga.js";a.getScript(T,function(){p()})}catch(S){console.log("Failed to load Google Analytics:"+S)}L=true}}}}})(jQuery);

