text: /*
   * ************************************************************* *
   * Name       : Power Tour                                       *
   * Date       : June 2012                                        *
   * Owner      : CreativeMilk                                     *
   * Url        : www.creativemilk.net                             *
   * Version    : 1.3                                              *
   * Updated    : 15/06/2013                                       *
   * Developer  : Mark                                             *
   * Dependency :                                                  *
   * Lib        : jQuery 1.7+                                      *
   * Licence    : NOT free                                         *
   * http://codecanyon.net/item/power-tour-powerfull-creative-jquery-tour-plugin/3246071
   * ************************************************************* *
   */
  
  ;(function(e,t,n,r){e.fn.powerTour=function(i){i=e.extend({},e.fn.powerTour.options,i);return this.each(function(){function I(t){if(t===true){e("body").addClass("powertour-runs")}else{e("body").removeClass("powertour-runs")}}function q(t,n){var r=v[t];var i=r.highlight;var s=r.highlightElements;if(i===true&&n!=true){e(".powertour-hook-zindex").removeClass("powertour-hook-zindex");if(e.inArray(r.arrowPosition,B)==-1){e('[data-tour-id="'+o+'"][data-tour-step="'+t+'"]').parent().addClass("powertour-hook-zindex")}if(e.trim(s)&&e(s).length){e(s).addClass("powertour-hook-zindex powertour-hook-relative")}e("#powertour-overlay").fadeTo(E,S)}if(n===true||i===false){e("#powertour-overlay").fadeOut(E);e(".powertour-hook-zindex").removeClass("powertour-hook-zindex")}}function R(n,r){if(T==true){var i=v[n];var s=e(i.hookTo);var u=i.center;var a=i.arrowPosition;if(e.inArray(a,B)==-1){var f=s.find('[data-tour-id="'+o+'"][data-tour-step="'+n+'"]');if(u=="step"||s.outerHeight()>=e(t).height()){var l=f.show().offset().top-e(t).height()/2+f.outerHeight()/2}else{l=s.offset().top-e(t).height()/2+s.outerHeight()/2}e("html, body").animate({scrollTop:l},x,g)}if(r===true){e("html, body").animate({scrollTop:0},x,g)}}}function U(t){if(e.trim(t)){if(t.indexOf(":")==-1){alert("Please use the right time format (mm:ss)")}var n=t.split(":").reverse();endTime=parseInt(n[0]*1e3+n[1]*6e4)}else{endTime=6e4}return endTime}function z(n,r){function i(){function t(e,t,n){var r=(Math.floor(e/t)%n).toString();if(r.length<2){var r="0"+r}return r}mins=t(endTime,6e4,60);secs=t(endTime,1e3,60);e("#powertour-time-timer b").html(mins+":"+secs)}U(n);t.cInter=setInterval(function(){if(endTime!=0){endTime-=1e3;i()}},1e3)}function W(t,n){if(t===true){e("body").addClass("powertour-pause");var r=e("#powertour-time-timer b").text();e("#powertour-time-timer b").replaceWith("<span>"+r+"</span>")}else{e("body").removeClass("powertour-pause");var r=e("#powertour-time-timer span").text();e("#powertour-time-timer span").replaceWith("<b>"+r+"</b>")}if(n===true){e("#powertour-time-timer span").replaceWith("<b>"+v[0].time+"</b>")}}function X(t){var n=v[t];var r=n.hookTo;var i=n.cloneTo;var s=n.customClassHook;var o=n.arrowPosition;e.each(v,function(t,n){var r=n.customClassHook;if(e.trim(r)){e("."+r).removeClass(r)}});if(e.trim(s)&&e.inArray(o,B)==-1&&e.trim(r)){e(r).addClass(s)}if(e.trim(s)&&e.trim(i)&&e.inArray(o,B)==-1){e(i).addClass(s)}}function V(){if(e.trim(A).length>1){if(A.indexOf("?")!=-1){top.location.href=A+"&tour=true"}else{top.location.href=A+"?tour=true"}}}function J(t){if(m=="auto"){clearTimeout(d);e("#powertour-time-ctrls, #powertour-time-timer").hide();p=0}e('[data-tour-id="'+o+'"]').fadeOut(E);X(0);R(0,true);q(0,true);if(m=="auto"&&m=="step"&&t!=r&&typeof v[parseInt(t-1)].onHideStep=="function"){v[parseInt(t-1)].onHideStep.call(this)}I(false)}function K(){if(p>=c){V();J(p);if(typeof H=="function"){H.call(this)}}else{var n=v[p];var i=v[parseInt(p-1)];var s=e('[data-tour-id="'+o+'"][data-tour-step="'+p+'"]');if(i!=r&&typeof i.onHideStep=="function"){i.onHideStep.call(this)}e("#powertour-time-ctrls, #powertour-time-timer").fadeIn(E);R(p,false);U(n.time);q(p,false);if(O===true){clearInterval(t.cInter);z(n.time)}e('[data-tour-id="'+o+'"]').not(s).fadeOut(E);s.fadeIn(E);if(typeof n.onShowStep=="function"){n.onShowStep.call(this)}X(p);p++;d=setTimeout(K,endTime)}}function Q(t){var n=v[t];var i=v[parseInt(t-1)];if(i!=r&&typeof i.onHideStep=="function"){i.onHideStep.call(this)}R(t,false);q(t,false);X(t);e('[data-tour-id="'+o+'"]:not([data-tour-step="'+t+'"])').fadeOut(E);e('[data-tour-id="'+o+'"][data-tour-step="'+t+'"]').fadeIn(E);if(typeof n.onShowStep=="function"){n.onShowStep.call(this)}}var s=e(this);var o=Math.floor(Math.random()*1111);var u=8;var a="50%";var f="20";var l=[];var c=i.step.length;var h="";var p=0;var d="";var v=i.step;var m=i.tourType;var g=i.easingEffect;var y=i.timeButtonOrder;var b=i.stepButtonOrder;var w=i.showTimeControls;var E=i.effectSpeed;var S=i.overlayOpacity;var x=i.travelSpeed;var T=i.animated;var N=i.timerLabel;var C=i.keyboardNavigation;var k=i.runOnLoad;var L=i.runOnLoadDelay;var A=i.exitUrl;var O=i.showTimer;var M=i.easyCancel;var _=i.onCancel;var D=i.onStop;var P=i.onStart;var H=i.onFinish;var B=new Array("sc","stl","stm","str","srm","sbr","sbm","sbl","slm");if("ontouchstart"in t||t.DocumentTouch&&n instanceof DocumentTouch){var j="click tap"}else{j="click"}e.each(v,function(t,n){if(e.inArray(n.arrowPosition,B)==-1){var r=e(n.hookTo);r.addClass("powertour-hook-relative")}else{var r=e("body")}if(e.trim(n.customClassStep)){var i=n.customClassStep}else{var i=""}if(n.width){var s=n.width}else{var s=300}var l='<div class="powertour powertour-style-basic '+i+'" style="display:none;" data-tour-id="'+o+'" data-tour-step="'+t+'">'+"<span></span>"+'<div class="powertour-inner">'+'<div class="powertour-content">No content found, check your settings!</div>'+'<footer class="powertour-footer"></footer>'+"</div>"+"</div>";r.append(l).children('[data-tour-step="'+t+'"]').css({width:s}).find(".powertour-content").html(e(n.content)).children().css({width:s-30}).show();var h=e('[data-tour-id="'+o+'"][data-tour-step="'+t+'"]');if(m!="tooltip"){if(n.prevLabel&&m!="showAll"&&t!=0){var p='<a href="javascript:void(0);" class="powertour-btn-prev"><span>'+n.prevLabel+"</span></a>"}else{var p=""}if(n.nextLabel&&m!="showAll"&&c!=t+1){var d='<a href="javascript:void(0);" class="powertour-btn-next"><span>'+n.nextLabel+"</span></a>"}else{var d=""}if(n.stopLabel){var v='<a href="javascript:void(0);" class="powertour-btn-stop"><span>'+n.stopLabel+"</span></a>"}else{var v=""}var g=b.replace(/%prev%/g,p).replace(/%next%/g,d).replace(/%stop%/g,v);if(e.trim(g)){h.find(".powertour-footer").append("<div>"+g+"</div>")}else{h.find(".powertour-footer").remove()}}else{h.find(".powertour-footer").remove()}var y=r.outerWidth();var w=r.outerHeight();var E=h.outerWidth();var S=h.outerHeight();if(n.showArrow!=true||e.inArray(n.arrowPosition,B)!=-1){h.children("span").remove();var x=0}else{h.children("span").addClass("powertour-arrow-"+n.arrowPosition);x=u}if(n.offsetY){var T=n.offsetY}else{T=0}if(n.offsetX){var N=n.offsetX}else{N=0}switch(n.arrowPosition){case"tl":h.css({left:N,top:-S-x-T});break;case"tm":h.css({left:a,marginLeft:-(E/2-N),top:-S-x-T});break;case"tr":h.css({right:N,top:-S-x-T});break;case"rt":h.css({left:y+N+x,top:T});break;case"rm":h.css({left:y+N+x,top:a,marginTop:-(S/2-T)});break;case"rb":h.css({left:y+N+x,bottom:T});break;case"bl":h.css({left:N,bottom:-S-x-T});break;case"bm":h.css({left:a,marginLeft:-(E/2-N),bottom:-S-x-T});break;case"br":h.css({right:N,bottom:-S-x-T});break;case"lt":h.css({right:y+N+x,top:T});break;case"lm":h.css({right:y+N+x,top:a,marginTop:-(S/2-T)});break;case"lb":h.css({right:y+N+x,bottom:T});break;case"sc":h.css({left:a,top:a,marginLeft:-(s/2-N),marginTop:-(S/2-T),position:"fixed"});break;case"stl":h.css({left:f-N,top:f-T,position:"fixed"});break;case"stm":h.css({left:a,marginLeft:-(s/2-N),top:f-T,position:"fixed"});break;case"str":h.css({right:f-N,top:f-T,position:"fixed"});break;case"srm":h.css({right:f-N,top:a,marginTop:-(S/2-T),position:"fixed"});break;case"sbr":h.css({right:f-N,bottom:f-T,position:"fixed"});break;case"sbm":h.css({left:a,bottom:f-T,marginLeft:-(s/2-N),position:"fixed"});break;case"sbl":h.css({left:f-N,bottom:f-T,position:"fixed"});break;case"slm":h.css({left:f-N,top:a,marginTop:-(S/2-T),position:"fixed"});break;default:h.css({right:y+N+x,top:T});break}if(n.cloneTo&&e.inArray(n.arrowPosition,B)==-1){e(n.cloneTo).addClass("powertour-hook-relative").append(e('[data-tour-id="'+o+'"][data-tour-step="'+t+'"]').clone()).children('[data-tour-id="'+o+'"][data-tour-step="'+t+'"]').attr("data-tour-step-clone",t)}if(m=="tooltip"){r.addClass("powertour-tooltip")}});if(m=="auto"){if(w===true){var F=y.replace(/%prev%/g,'<a href="#" id="powertour-time-prev"></a>').replace(/%stop%/g,'<a href="#" id="powertour-time-stop"></a>').replace(/%pause%/g,'<a href="#" id="powertour-time-pause"></a>').replace(/%play%/g,'<a href="#" id="powertour-time-play"></a>').replace(/%next%/g,'<a href="#" id="powertour-time-next"></a>');e("body").append('<div id="powertour-time-ctrls">'+F+"</div>")}if(O===true){e("body").append('<div id="powertour-time-timer">'+N+"<b>"+v[0].time+"</b></div>")}}e("body").append('<div id="powertour-overlay"></div>');var G=decodeURIComponent((location.search.match(RegExp("[?|&]tour=(.+?)(&|$)"))||[,null])[1]);s.on(j,this,function(t){I(true);if(typeof P=="function"){P.call(this)}if(m=="auto"){K()}else if(m=="showAll"){e('[data-tour-id="'+o+'"]').fadeIn(E)}else if(m=="step"){Q(0)}t.preventDefault()});if(k===true||G=="true"){setTimeout(function(){I(true);if(typeof P=="function"){P.call(this)}if(m=="auto"){K()}else if(m=="showAll"){e('[data-tour-id="'+o+'"]').fadeIn(E)}else if(m=="step"){Q(0)}},L)}if(m=="tooltip"){e(".powertour-tooltip").hover(function(){var t=e(this).children('[data-tour-id="'+o+'"]').data("tour-step");e(this).children('[data-tour-id="'+o+'"]').stop(true,true).fadeIn(E);e('[data-tour-id="'+o+'"][data-tour-step-clone="'+t+'"]').stop(true,true).fadeIn(E)},function(){e('[data-tour-id="'+o+'"]').stop(true,true).fadeOut(E)})}e("body").on(j,".powertour-btn-prev, .powertour-btn-next",function(t){var n=e(this).parents('[data-tour-id="'+o+'"]').data("tour-step");if(m=="step"){if(e(t.target).parents().hasClass("powertour-btn-prev")){Q(n-1)}if(e(t.target).parents().hasClass("powertour-btn-next")){Q(n+1)}}else if(m=="auto"){if(e(t.target).parents().hasClass("powertour-btn-prev")&&p>1){p=p-2;clearTimeout(d);K()}if(e(t.target).parents().hasClass("powertour-btn-next")){clearTimeout(d);K()}}t.preventDefault()});e("body").on(j,"#powertour-time-stop, #powertour-time-next, #powertour-time-prev, #powertour-time-play, #powertour-time-pause",function(t){if(e(t.target).is(e("#powertour-time-stop"))){I(false);var n=e('.powertour[data-tour-id="'+o+'"]:visible').data("tour-step");J(n+1);if(m=="auto"){W(false,true)}if(typeof D=="function"){D.call(this)}}if(e(t.target).is(e("#powertour-time-next"))&&e(".powertour-pause").length<1){if(m=="auto"){clearTimeout(d);K()}}if(e(t.target).is(e("#powertour-time-prev"))&&e(".powertour-pause").length<1){if(p>1&&m=="auto"){p=p-2;clearTimeout(d);K()}}if(e(t.target).is(e("#powertour-time-pause"))&&e(".powertour-pause").length<1){W(true,false);clearTimeout(d)}if(e(t.target).is(e("#powertour-time-play"))&&e(".powertour-pause").length){var r=e("#powertour-time-timer span").text();W(false,false);U(r);d=setTimeout(K,endTime)}t.preventDefault()});if(M===true){e(n).on(j,this,function(t){if(e(".powertour-runs").length&&!e(t.target).is(e(" *",'[data-tour-id="'+o+'"]'))&&!e(t.target).is(e(" *",s))&&!e(t.target).is(e(s))&&!e(t.target).is(e("#powertour-time-timer, #powertour-time-timer *"))&&!e(t.target).is(e("#powertour-time-ctrls, #powertour-time-ctrls *"))&&!e(t.target).is(e(".powertour-hook-relative, .powertour-hook-relative *"))){I(false);var n=e('.powertour[data-tour-id="'+o+'"]:visible').data("tour-step");J(n+1);if(m=="auto"){W(false,true)}if(typeof _=="function"){_.call(this)}}})}e("body").on(j,".powertour-btn-stop",function(t){var n=e(this).parents(".powertour").data("tour-step");I(false);J(n+1);if(n+1==c){if(typeof H=="function"){H.call(this)}V()}else{if(typeof D=="function"){D.call(this)}}t.preventDefault()});if(C===true){e(n).keyup(function(t){if(t.keyCode==27&&e(".powertour-runs").length){I(false);var n=e('.powertour[data-tour-id="'+o+'"]:visible').data("tour-step");J(n+1);W(true,true);if(typeof _=="function"){_.call(this)}}});e(n).keydown(function(t){var n=e("body").find('[data-tour-id="'+o+'"]:visible').data("tour-step");if(t.keyCode==32&&e(".powertour-runs").length&&m=="auto"){t.preventDefault();if(e(".powertour-pause").length){var r=e("#powertour-time-timer span").text();W(false,false);U(r);d=setTimeout(K,endTime)}else{W(true,false);clearTimeout(d)}}if(t.keyCode==37&&e(".powertour-pause").length<1&&e(".powertour-runs").length){if(m=="auto"&&p>1){p=p-2;clearTimeout(d);K()}if(m=="step"&&n>0){var i=n-1;Q(i)}}if(t.keyCode==39&&e(".powertour-pause").length<1&&e(".powertour-runs").length){if(m=="auto"){clearTimeout(d);K()}if(m=="step"&&n+1<c){var i=n+1;Q(i)}}})}})};e.fn.powerTour.options={tourType:"step",overlayOpacity:.5,showTimeControls:true,showTimer:true,timeButtonOrder:"%prev% %stop% %pause% %play% %next%",stepButtonOrder:"%prev% %next% %stop%",timerLabel:"Next step in: ",effectSpeed:200,travelSpeed:400,easingEffect:"linear",easyCancel:true,animated:true,keyboardNavigation:true,runOnLoad:false,runOnLoadDelay:2e3,exitUrl:"",onStart:function(){},onFinish:function(){},onStop:function(){},onCancel:function(){},step:[{hookTo:"",content:"",cloneTo:"",width:300,arrowPosition:"rt",showArrow:true,offsetY:0,offsetX:0,prevLabel:"Prev",nextLabel:"Next",stopLabel:"Stop",center:"hook",customClassStep:"",customClassHook:"",highlight:true,highlightElements:"",time:"01:00",onShowStep:function(){},onHideStep:function(){}}]}})(jQuery,window,document)