function anyClipHelpers(){}
anyClipHelpers.nvl=function(origVal,defaultVal){var retVal=origVal;try{if(!retVal||retVal=='undefined'||retVal+''=='undefined')
retVal=defaultVal;return retVal;}
catch(e){return defaultVal;}};anyClipHelpers.leftPadStringWithChar=function(origString,charToPadWith,desiredLengthOfFinalString){origString=new String(origString).toString();charToPadWith=new String(charToPadWith).toString();desiredLengthOfFinalString=parseInt(desiredLengthOfFinalString);while(origString.length<desiredLengthOfFinalString){origString=charToPadWith+origString;}
return origString;};anyClipHelpers.parseMomentDurationForDisplayFromMS=function(msToParseFrom){var tempDataObj=new Date(msToParseFrom);var timeIndicationString=anyClipHelpers.leftPadStringWithChar(tempDataObj.getMinutes(),'0',2)+':'+
anyClipHelpers.leftPadStringWithChar(tempDataObj.getSeconds(),'0',2);return timeIndicationString;};anyClipHelpers.update_holding_page=function(response){if(typeof onActioPerformed=='function'){onActioPerformed(response);}};anyClipHelpers.htmlEncode=function(value){return $('<div/>').text(anyClipHelpers.nvl(value,'')).html();};anyClipHelpers.htmlDecode=function(value){return $('<div/>').html(anyClipHelpers.nvl(value,'')).text();};anyClipHelpers.strOptionsToObjOptions=function(strOptions){var retVal=[];var optionsArray=strOptions.split("&");for(var i=0;i<optionsArray.length;++i){if(optionsArray[i]!=''){var currParam=optionsArray[i].split("=");retVal[retVal.length]="'"+currParam[0]+"': "+"'"+currParam[1]+"'";}}
eval('retVal = {'+retVal.join(',')+'}');return retVal;};anyClipHelpers.getClipUrl=function(clip){if(clip.name){return"/"+clip.title_unique_name+"/"+clip.name;}
else{return"/"+clip.title_unique_name+"/"+clip.code;}};anyClipHelpers.getClipFullUrl=function(clip){return'http://anyclip.com'+anyClipHelpers.getClipUrl(clip);};anyClipHelpers.renderPlayerByType=function(playerType,bShouldInitPlayer,playerHTMLplaceholderID,playerURL,code,token,bShouldAutoplay,strFlashOptions,renderedPlayerID,renderedPLayerClass){var sizesHash={};var elementCodeClass='';switch(playerType){case('trailer'):{sizesHash={width:'588',height:'294'};elementCodeClass='titleCode=';break;}
default:{sizesHash={width:'100%',height:'100%'};elementCodeClass='code=';break;}}
if(bShouldInitPlayer)
init();var player_place_holder=$(playerHTMLplaceholderID);var player_container=player_place_holder.parent();swfobject.embedSWF(playerURL,playerHTMLplaceholderID,sizesHash.width,sizesHash.height,'9','','',{'quality':'high','allowfullscreen':'true','bgcolor':'#000000','allowScriptAccess':'always','flashVars':elementCodeClass+
code+'&token='+
token+'&autoPlay='+
bShouldAutoplay+'&'+
strFlashOptions,'wmode':'transparent'},{id:renderedPlayerID,styleclass:renderedPLayerClass});};anyClipHelpers.renderTrailerPlayer=function(bShouldInitPlayer,playerHTMLplaceholderID,playerURL,titleCode,token,bShouldAutoplay,strFlashOptions,renderedPlayerID,renderedPLayerClass){anyClipHelpers.renderPlayerByType('trailer',bShouldInitPlayer,playerHTMLplaceholderID,playerURL,titleCode,token,bShouldAutoplay,strFlashOptions,renderedPlayerID,renderedPLayerClass);};anyClipHelpers.renderPlayer=function(bShouldInitPlayer,playerHTMLplaceholderID,playerURL,clipCode,token,bShouldAutoplay,strFlashOptions,renderedPlayerID,renderedPLayerClass){anyClipHelpers.renderPlayerByType('regular',bShouldInitPlayer,playerHTMLplaceholderID,playerURL,clipCode,token,bShouldAutoplay,strFlashOptions,renderedPlayerID,renderedPLayerClass);};anyClipHelpers.getClipEmbedCode=function(clip){var retVal="Currently unavailable";if(clip.code){var linkBack="";retVal='<object width="425px" height="275px" type="application/x-shockwave-flash" class="AnyClipEmbeddedPlayer" id="AnyClipEmbeddedPlayer-'+clip.code+'" data="http://player.anyclip.com/PlayerEm.swf?v='+((new Date()).getTime())+'&amp;>'+'<param name="quality" value="high">'+'<param name="allowfullscreen" value="true">'+'<param name="bgcolor" value="#000000">'+'<param name="allowScriptAccess" value="always">'+'<param name="flashVars" value="code='+
clip.code+'&amp;autoPlay=false">'+'<param name="wmode" value="transparent">'+'</object>';if(clip.name){linkBack+='<a href="'+anyClipHelpers.getClipFullUrl(clip)+'" class="AnyClipEmbeddedPlayer-TrackBack-Clip" rel="http://anyclip.com">'+clip.display_name+'</a> ';}
else{linkBack+='Clip ';}
linkBack+='from ';linkBack+='<a href="http://anyclip.com/'+clip.title_unique_name+'" class="AnyClipEmbeddedPlayer-TrackBack-Title" rel="http://anyclip.com">'+clip.title_name+'</a>';if(clip.characters&&clip.characters.length>=1){linkBack+=" starring "
for(var i=0;i<2&&i<clip.characters.length;++i){linkBack+='<a href="http://anyclip.com/actors/'+clip.characters[i].actor.api_entity.unique_name+'" class="AnyClipEmbeddedPlayer-TrackBack-Actor" rel="http://anyclip.com">'+clip.characters[i].actor.api_entity.name+'</a> ';}}
retVal+='<strong class="AnyClipEmbeddedPlayer-TrackBack-Wrapper" style="font-family: arial; font-size: 14px; width: 425px; display: block; ">'+linkBack+'</strong>';}
return retVal;};$.fn.ac_track=function(options)
{var element=$(this);if(options.category!=undefined)
{options=$.extend({event_name:'click'},options)
element.track(options);var event_name=options.event_name;element.bind(event_name,function(eventname,data){traceWatch.send_event(options,$(this),data);});}
else
{}};anyClipHelpers.track_event=function(settings){$.trackEvent(settings.category,settings.action,'',"");traceWatch.send_event(settings,null);}
anyClipHelpers.add_flash_msg=function(m_type,m_msg){$('#msgs').html("<p class='"+m_type+"'>"+m_msg+"</p>");}
$.fn.ac_track.defaults={};function createParamTag(name,value){var param=document.createElement('param');param.setAttribute('name',name);param.setAttribute('value',value);return param;}
$(document).ready(function(){$('.selectable-on-click').click(function(){$(this).focus().select();});$("html").bind("ajaxStart",function(){$(this).addClass('ajax-call-loading');}).bind("ajaxStop",function(){$(this).removeClass('ajax-call-loading');});});;(function($){$().ajaxSend(function(a,xhr,s){xhr.setRequestHeader("Accept","text/javascript, text/html, application/xml, text/xml, */*");});})(jQuery);(function($){$.fn.reset=function(){return this.each(function(){if(typeof this.reset=="function"||(typeof this.reset=="object"&&!this.reset.nodeType)){this.reset();}});};$.fn.enable=function(){return this.each(function(){this.disabled=false;});};$.fn.disable=function(){return this.each(function(){this.disabled=true;});};})(jQuery);(function($){$.extend({fieldEvent:function(el,obs){var field=el[0]||el,e="change";if(field.type=="radio"||field.type=="checkbox"){e="click";}else{if(obs&&field.type=="text"||field.type=="textarea"){e="keyup";}}return e;}});$.fn.extend({delayedObserver:function(delay,callback){var el=$(this);if(typeof window.delayedObserverStack=="undefined"){window.delayedObserverStack=[];}if(typeof window.delayedObserverCallback=="undefined"){window.delayedObserverCallback=function(stackPos){observed=window.delayedObserverStack[stackPos];if(observed.timer){clearTimeout(observed.timer);}observed.timer=setTimeout(function(){observed.timer=null;observed.callback(observed.obj,observed.obj.formVal());},observed.delay*1000);observed.oldVal=observed.obj.formVal();};}window.delayedObserverStack.push({obj:el,timer:null,delay:delay,oldVal:el.formVal(),callback:callback});var stackPos=window.delayedObserverStack.length-1;if(el[0].tagName=="FORM"){$(":input",el).each(function(){var field=$(this);field.bind($.fieldEvent(field,delay),function(){observed=window.delayedObserverStack[stackPos];if(observed.obj.formVal()==observed.obj.oldVal){return;}else{window.delayedObserverCallback(stackPos);}});});}else{el.bind($.fieldEvent(el,delay),function(){observed=window.delayedObserverStack[stackPos];if(observed.obj.formVal()==observed.obj.oldVal){return;}else{window.delayedObserverCallback(stackPos);}});}},formVal:function(){var el=this[0];if(el.tagName=="FORM"){return this.serialize();}if(el.type=="checkbox"||self.type=="radio"){return this.filter("input:checked").val()||"";}else{return this.val();}}});})(jQuery);(function($){$.fn.extend({visualEffect:function(o){e=o.replace(/\_(.)/g,function(m,l){return l.toUpperCase();});return eval("$(this)."+e+"()");},appear:function(speed,callback){return this.fadeIn(speed,callback);},blindDown:function(speed,callback){return this.show("blind",{direction:"vertical"},speed,callback);},blindUp:function(speed,callback){return this.hide("blind",{direction:"vertical"},speed,callback);},blindRight:function(speed,callback){return this.show("blind",{direction:"horizontal"},speed,callback);},blindLeft:function(speed,callback){this.hide("blind",{direction:"horizontal"},speed,callback);return this;},dropOut:function(speed,callback){return this.hide("drop",{direction:"down"},speed,callback);},dropIn:function(speed,callback){return this.show("drop",{direction:"up"},speed,callback);},fade:function(speed,callback){return this.fadeOut(speed,callback);},fadeToggle:function(speed,callback){return this.animate({opacity:"toggle"},speed,callback);},fold:function(speed,callback){return this.hide("fold",{},speed,callback);},foldOut:function(speed,callback){return this.show("fold",{},speed,callback);},grow:function(speed,callback){return this.show("scale",{},speed,callback);},highlight:function(speed,callback){return this.show("highlight",{},speed,callback);},puff:function(speed,callback){return this.hide("puff",{},speed,callback);},pulsate:function(speed,callback){return this.show("pulsate",{},speed,callback);},shake:function(speed,callback){return this.show("shake",{},speed,callback);},shrink:function(speed,callback){return this.hide("scale",{},speed,callback);},squish:function(speed,callback){return this.hide("scale",{origin:["top","left"]},speed,callback);},slideUp:function(speed,callback){return this.hide("slide",{direction:"up"},speed,callback);},slideDown:function(speed,callback){return this.show("slide",{direction:"up"},speed,callback);},switchOff:function(speed,callback){return this.hide("clip",{},speed,callback);},switchOn:function(speed,callback){return this.show("clip",{},speed,callback);}});})(jQuery);;;(function($){$.fn.anyclipPlayer=function(options){var settings=$.extend({playerUrl:null,clipCode:null,titleCode:null,bShouldAutoplay:false,token:null,strFlashOptions:null,bShouldInitPlayer:true,renderedPlayerID:null,renderedPLayerClass:null,NF_Links:false,ytURL:null,startTime:null},options);return $(this).each(function(){var sizesHash={};var elementCode='';if(settings.titleCode){sizesHash={width:'646',height:'323'};elementCode='titleCode='+settings.titleCode;}
else{sizesHash={width:'100%',height:'100%'};elementCode='code='+settings.clipCode;}
var flash_vars=elementCode;if(settings.token)
{flash_vars+='&token='+settings.token;}
flash_vars+='&autoPlay='+
settings.bShouldAutoplay+'&NF_Links='+
settings.NF_Links+'&'+
settings.strFlashOptions;if(settings.ytURL){flash_vars+='&ytURL='+
settings.ytURL+'&fs=1'+'&enablejsapi=1'+'&startTime='+
settings.startTime;}
if(settings.bShouldInitPlayer)
init();var player_container=$(this).parent();swfobject.embedSWF(settings.playerUrl,$(this).attr('id'),sizesHash.width,sizesHash.height,'9','','',{'quality':'high','allowfullscreen':'true','bgcolor':'#000000','allowScriptAccess':'always','flashVars':flash_vars,'wmode':'transparent'},{id:settings.renderedPlayerID,styleclass:settings.renderedPLayerClass});});};})(jQuery);;$(document).ready(function(){var dropdown=$('li.dropdown');dropdown.hover(function(){$('ul',this).css('display','block');},function(){$('ul',this).css('display','none');});});;(function($){$.InFieldLabels=function(b,c,d){var f=this;f.$label=$(b);f.label=b;f.$field=$(c);f.field=c;f.$label.data("InFieldLabels",f);f.showing=true;f.init=function(){f.options=$.extend({},$.InFieldLabels.defaultOptions,d);if(f.$field.val()!=""){f.$label.hide();f.showing=false};f.$field.focus(function(){f.fadeOnFocus()}).blur(function(){f.checkForEmpty(true)}).bind('keydown.infieldlabel',function(e){f.hideOnChange(e)}).change(function(e){f.checkForEmpty()}).bind('onPropertyChange',function(){f.checkForEmpty()})};f.fadeOnFocus=function(){if(f.showing){f.setOpacity(f.options.fadeOpacity)}};f.setOpacity=function(a){f.$label.stop().animate({opacity:a},f.options.fadeDuration);f.showing=(a>0.0)};f.checkForEmpty=function(a){if(f.$field.val()==""){f.prepForShow();f.setOpacity(a?1.0:f.options.fadeOpacity)}else{f.setOpacity(0.0)}};f.prepForShow=function(e){if(!f.showing){f.$label.css({opacity:0.0}).show();f.$field.bind('keydown.infieldlabel',function(e){f.hideOnChange(e)})}};f.hideOnChange=function(e){if((e.keyCode==16)||(e.keyCode==9))return;if(f.showing){f.$label.hide();f.showing=false};f.$field.unbind('keydown.infieldlabel')};f.init()};$.InFieldLabels.defaultOptions={fadeOpacity:0.5,fadeDuration:300};$.fn.inFieldLabels=function(c){return this.each(function(){var a=$(this).attr('for');if(!a)return;var b=$("input#"+a+"[type='text'],"+"input#"+a+"[type='password'],"+"textarea#"+a);if(b.length==0)return;(new $.InFieldLabels(this,b[0],c))})}})(jQuery);;(function($){$(document).ready(function(){$("label.overlayed").inFieldLabels({fadeDuration:150,fadeOpacity:0.8}).bind('click focus',function(){$('#'+$(this).attr('for')).focus();});});})(jQuery);;function selectReplacement(obj){obj.className+=' replaced';var ul=document.createElement('ul');ul.className='selectReplacement';var opts=obj.options;var selectedOpt=(!obj.selectedIndex)?0:obj.selectedIndex;for(var i=0;i<opts.length;i++){var li=document.createElement('li');var txt=document.createTextNode(opts[i].text);li.appendChild(txt);li.selIndex=i;li.selectID=obj.id;li.onclick=function(){selectMe(this);};if(i==selectedOpt){li.className='selected';li.onclick=function(){this.parentNode.className+=' selectOpen';this.onclick=function(){selectMe(this);};};}
if(window.attachEvent){li.onmouseover=function(){this.className+=' hover';};li.onmouseout=function(){this.className=this.className.replace(new RegExp(" hover\\b"),'');};}
ul.appendChild(li);}
obj.onfocus=function(){ul.className+=' selectFocused';};obj.onblur=function(){ul.className='selectReplacement';};obj.onchange=function(){var idx=this.selectedIndex;selectMe(ul.childNodes[idx]);};obj.onkeypress=obj.onchange;obj.parentNode.insertBefore(ul,obj);}
function selectMe(obj){var lis=obj.parentNode.getElementsByTagName('li');for(var i=0;i<lis.length;i++){if(lis[i]!=obj){lis[i].className='';lis[i].onclick=function(){selectMe(this);};}
else{setVal(obj.selectID,obj.selIndex);obj.className='selected';obj.parentNode.className=obj.parentNode.className.replace(new RegExp(" selectOpen\\b"),'');obj.onclick=function(){obj.parentNode.className+=' selectOpen';this.onclick=function(){selectMe(this);};};}}}
function setVal(objID,val){var obj=document.getElementById(objID);obj.selectedIndex=val;}
function setForm(){var s=document.getElementById('type');if(s!=null){selectReplacement(s);}}
window.onload=function(){(document.all&&!window.print)?null:setForm();};;(function($){$.lightbox=function(options,extra_key,extra_value){if(!$.isFunction(top.lightbox)){top.lightbox=function(options,extra_key,extra_value){if(typeof options=='string'){if(typeof extra_key=='string'){if(typeof extra_value!="undefined"){var ex=$('#modal-'+options).data('lightbox_extra');ex[extra_key]=extra_value;$('#modal-'+options).data('lightbox_extra',ex);}
else{return $('#modal-'+options).data('lightbox_extra')[extra_key];}}
else{return $('#modal-'+options);}}
else{var settings=$.extend({element:null,uri:null,width:300,height:340,title:null,name:null,open:null,close:null,extra:null,dialog_options:null},options);if(settings.element){var $element=$(settings.element);}
else
if(settings.uri){var $element=$('<iframe/>').attr('class','modal-iframe').attr('frameBorder','0').attr('src',settings.uri).width(settings.width).height(settings.height);if(settings.name){$element.attr('id','modal-'+settings.name)}}
if(settings.extra){$element.data('lightbox_extra',settings.extra);}
if($element.length){return $element.dialog($.extend({title:settings.title,width:settings.width,height:settings.height,modal:true,resizable:false,draggable:false,open:function(ev,ui){if($.isFunction(settings.open)){settings.open.call(this,ev,ui);}},close:function(ev,ui){if($.isFunction(settings.close)){settings.close.call(this,ev,ui);}
$(this).filter('iframe').remove();}},settings.dialog_options)).width(settings.width).height(settings.height);}}}}
return top.lightbox.call(this,options,extra_key,extra_value);}
$.login_lightbox=function(options){var settings=$.extend({uri:null,refresh_page:false,success:null,save_moment:null},options);if(!settings.uri){settings.uri=$('a#nav-login').attr('href');}
return $.lightbox({uri:settings.uri+'?modal=1',width:300,height:400,title:'Log In',name:'login',extra:{refresh_page:settings.refresh_page,success:settings.success,save_moment:settings.save_moment}});};$('a[rel="login"]').live('click',function(e){$.login_lightbox({refresh_page:true});e.preventDefault();return false;});$('a[rel^="modal"]').live('click',function(e){var _args=$(this).attr('rel').split(',');var _width=(1 in _args&&_args[1])?parseInt(_args[1]):300;var _height=(2 in _args&&_args[2])?parseInt(_args[2]):340;var uri=$(this).attr('href');var modal_param=(uri.match(/\?/)?'&':'?')+'modal=1';$.lightbox({uri:uri+modal_param,width:_width,height:_height,title:$(this).attr('title')?$(this).attr('title'):$(this).text(),name:$(this).attr('id')});e.preventDefault();return false;});$('a[rel="logout"]','body.modal').bind('click',function(e){var href=$(this).attr('href');try{href+='?back='+encodeURIComponent(top.document.location);top.document.location=href;e.preventDefault();return false;}
catch(e){}})
$('a[href]:not([onclick]):not([rel=logout]):not([rel^=modal])','body.modal').live('click',function(e){try{top.document.location=$(this).attr('href');e.preventDefault();return false;}
catch(e){}});})(jQuery);;(function($){var pageTracker;$.trackPage=function(account_id,options){var host=(("https:"==document.location.protocol)?"https://ssl.":"http://www.");var script;var settings=$.extend({},{onload:true,status_code:200},options);var src=host+'google-analytics.com/ga.js';function init_analytics(){if(typeof _gat!=undefined){debug('Google Analytics loaded');pageTracker=_gat._getTracker(account_id);if(settings.status_code==null||settings.status_code==200){pageTracker._trackPageview();}else{debug('Tracking error '+settings.status_code);pageTracker._trackPageview("/"+settings.status_code+".html?page="+document.location.pathname+document.location.search+"&from="+document.referrer);}
if($.isFunction(settings.callback)){settings.callback(pageTracker);}}
else{throw"_gat is undefined";}}
load_script=function(){$.ajax({type:"GET",url:src,success:function(){init_analytics();},dataType:"script",cache:true});}
if(settings.onload==true||settings.onload==null){$(window).load(load_script);}else{load_script();}}
$.trackEvent=function(category,action,label,value){if(typeof pageTracker=='undefined'){debug('FATAL: pageTracker is not defined');}else{pageTracker._trackEvent(category,action,label,value);var message="category:'"+category+"' action:'"+action+"' label:'"+label+"' value:'"+value+"'";debug("Tracked: "+message);}};$.trackPageview=function(uri){if(typeof pageTracker=='undefined'){debug('FATAL: pageTracker is not defined');}else{pageTracker._trackPageview(uri);}}
$.fn.track=function(options){return this.each(function(){var element=$(this);if(element.hasClass('tracked')){return false;}else{element.addClass('tracked');}
var settings=$.extend({},$.fn.track.defaults,options);var category=evaluate(element,settings.category);var action=evaluate(element,settings.action);var label=evaluate(element,settings.label);var value=evaluate(element,settings.value);var event_name=evaluate(element,settings.event_name);var message="category:'"+category+"' action:'"+action+"' label:'"+label+"' value:'"+value+"'";debug('Tracking '+event_name+' '+message);element.bind(event_name+'.track',function(){var skip=settings.skip_internal&&(element[0].hostname==location.hostname);if(!skip){$.trackEvent(category,action,label,value);debug('Tracked '+message);}else{debug('Skipped '+message);}
return true;});});function evaluate(element,text_or_function){if(typeof text_or_function=='function'){text_or_function=text_or_function(element);}
return text_or_function;};};function debug(message){if(typeof console!='undefined'&&typeof console.debug!='undefined'&&$.fn.track.defaults.debug){console.debug(message);}};$.fn.track.defaults={category:function(element){return(element[0].hostname==location.hostname)?'internal':'external';},action:'click',label:function(element){return element.attr('href');},value:null,skip_internal:true,event_name:'click',debug:false};})(jQuery);;jQuery.cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1;}
var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}
expires='; expires='+date.toUTCString();}
var path=options.path?'; path='+(options.path):'';var domain=options.domain?'; domain='+(options.domain):'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('');}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}
return cookieValue;}};;function traceWatch(){};traceWatch.setStatCookie=function(data)
{$.cookie('stat',JSON.stringify(data));};traceWatch.getStatFromCookie=function(){retVal=null;if($.cookie('stat')!=null)
{retVal=JSON.parse($.cookie('stat'));}
return retVal;}
traceWatch.deleteStatCookie=function()
{$.cookie('stat',null);};traceWatch.ajaxRequest=function(data)
{$.ajax({url:traceWatch.tw_url,data:data,cache:false,dataType:'text',success:function(data){traceWatch.deleteStatCookie();traceWatch.debug('the event was updated');},});};traceWatch.send_event=function(twatchData,$element,data){twatchData.page=window.location+"";if(typeof document.referrer!='undefined'&&document.referrer!=''){twatchData.ref=document.referrer+"";}
$.extend(twatchData,traceWatch.tw_global_data);if($.isFunction(twatchData.before_update)){twatchData=$.extend({},twatchData,twatchData.before_update(twatchData,$element,data));twatchData.before_update=undefined;}
for(var elem_key in twatchData){if($.isFunction(twatchData[elem_key]))
{twatchData[elem_key]=twatchData[elem_key](twatchData,$element);}}
traceWatch.debug('updating the event with the following data: ',twatchData);traceWatch.setStatCookie(twatchData);traceWatch.ajaxRequest(twatchData);};traceWatch.init_for_current_page=function(tw_url,global_data,current_data,debug){traceWatch.tw_url=tw_url;traceWatch.debug_enabled=debug;traceWatch.debug('The url of the TraceWatch is set to '+tw_url);traceWatch.tw_global_data=global_data;var previousPageData=traceWatch.getStatFromCookie();if(previousPageData!=null)
{traceWatch.ajaxRequest(previousPageData);traceWatch.deleteStatCookie();}
traceWatch.send_event(current_data);};traceWatch.debug=function(msg)
{if(typeof console!='undefined'&&typeof console.debug!='undefined'&&traceWatch.debug_enabled)
{console.debug(msg);}};;if(!this.JSON){this.JSON={};}
(function(){function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+
f(this.getUTCMonth()+1)+'-'+
f(this.getUTCDate())+'T'+
f(this.getUTCHours())+':'+
f(this.getUTCMinutes())+':'+
f(this.getUTCSeconds())+'Z':null;};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};}
var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapable.lastIndex=0;return escapable.test(string)?'"'+string.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+
partial.join(',\n'+gap)+'\n'+
mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+
mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
if(typeof JSON.stringify!=='function'){JSON.stringify=function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});};}
if(typeof JSON.parse!=='function'){JSON.parse=function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
text=String(text);cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+
('0000'+a.charCodeAt(0).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');};}}());