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($){$.event.special.mousewheel={setup:function(){var handler=$.event.special.mousewheel.handler;if($.browser.mozilla)
$(this).bind('mousemove.mousewheel',function(event){$.data(this,'mwcursorposdata',{pageX:event.pageX,pageY:event.pageY,clientX:event.clientX,clientY:event.clientY});});if(this.addEventListener)
this.addEventListener(($.browser.mozilla?'DOMMouseScroll':'mousewheel'),handler,false);else
this.onmousewheel=handler;},teardown:function(){var handler=$.event.special.mousewheel.handler;$(this).unbind('mousemove.mousewheel');if(this.removeEventListener)
this.removeEventListener(($.browser.mozilla?'DOMMouseScroll':'mousewheel'),handler,false);else
this.onmousewheel=function(){};$.removeData(this,'mwcursorposdata');},handler:function(event){var args=Array.prototype.slice.call(arguments,1);event=$.event.fix(event||window.event);$.extend(event,$.data(this,'mwcursorposdata')||{});var delta=0,returnValue=true;if(event.wheelDelta)delta=event.wheelDelta/120;if(event.detail)delta=-event.detail/3;event.data=event.data||{};event.type="mousewheel";args.unshift(delta);args.unshift(event);return $.event.handle.apply(this,args);}};$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel");},unmousewheel:function(fn){return this.unbind("mousewheel",fn);}});})(jQuery);;$(document).ready(function(){var dropdown=$('li.dropdown');dropdown.hover(function(){$('ul',this).css('display','block');},function(){$('ul',this).css('display','none');});});;jQuery(function($){var eventName='emchange';$.em=$.extend({version:'1.0',delay:200,element:$('<div />').css({left:'-100em',position:'absolute',width:'100em'}).prependTo('body')[0],action:function(){var currentWidth=$.em.element.offsetWidth/100;if(currentWidth!=$.em.current){$.em.previous=$.em.current;$.em.current=currentWidth;$.event.trigger(eventName,[$.em.current,$.em.previous]);}}},$.em);$.fn[eventName]=function(fn){return fn?this.bind(eventName,fn):this.trigger(eventName);};$.em.current=$.em.element.offsetWidth/100;$.em.iid=setInterval($.em.action,$.em.delay);});;(function($){$.jScrollPane={active:[]};$.fn.jScrollPane=function(settings)
{settings=$.extend({},$.fn.jScrollPane.defaults,settings);var rf=function(){return false;};return this.each(function()
{var $this=$(this);var paneEle=this;var currentScrollPosition=0;var paneWidth;var paneHeight;var trackHeight;var trackOffset=settings.topCapHeight;var $container;if($(this).parent().is('.jScrollPaneContainer')){$container=$(this).parent();currentScrollPosition=settings.maintainPosition?$this.position().top:0;var $c=$(this).parent();paneWidth=$c.innerWidth();paneHeight=$c.outerHeight();$('>.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown, >.jScrollCap',$c).remove();$this.css({'top':0});}else{$this.data('originalStyleTag',$this.attr('style'));$this.css('overflow','hidden');this.originalPadding=$this.css('paddingTop')+' '+$this.css('paddingRight')+' '+$this.css('paddingBottom')+' '+$this.css('paddingLeft');this.originalSidePaddingTotal=(parseInt($this.css('paddingLeft'))||0)+(parseInt($this.css('paddingRight'))||0);paneWidth=$this.innerWidth();paneHeight=$this.innerHeight();$container=$('<div></div>').attr({'className':'jScrollPaneContainer'}).css({'height':paneHeight+'px','width':paneWidth+'px'});if(settings.enableKeyboardNavigation){$container.attr('tabindex',settings.tabIndex);}
$this.wrap($container);$container=$this.parent();$(document).bind('emchange',function(e,cur,prev)
{$this.jScrollPane(settings);});}
trackHeight=paneHeight;if(settings.reinitialiseOnImageLoad){var $imagesToLoad=$.data(paneEle,'jScrollPaneImagesToLoad')||$('img',$this);var loadedImages=[];if($imagesToLoad.length){$imagesToLoad.each(function(i,val){$(this).bind('load readystatechange',function(){if($.inArray(i,loadedImages)==-1){loadedImages.push(val);$imagesToLoad=$.grep($imagesToLoad,function(n,i){return n!=val;});$.data(paneEle,'jScrollPaneImagesToLoad',$imagesToLoad);var s2=$.extend(settings,{reinitialiseOnImageLoad:false});$this.jScrollPane(s2);}}).each(function(i,val){if(this.complete||this.complete===undefined){this.src=this.src;}});});};}
var p=this.originalSidePaddingTotal;var realPaneWidth=paneWidth-settings.scrollbarWidth-settings.scrollbarMargin-p;var cssToApply={'height':'auto','width':realPaneWidth+'px'}
if(settings.scrollbarOnLeft){cssToApply.paddingLeft=settings.scrollbarMargin+settings.scrollbarWidth+'px';}else{cssToApply.paddingRight=settings.scrollbarMargin+'px';}
$this.css(cssToApply);var contentHeight=$this.outerHeight();var percentInView=paneHeight/contentHeight;var isScrollable=percentInView<.99;$container[isScrollable?'addClass':'removeClass']('jScrollPaneScrollable');if(isScrollable){$container.append($('<div></div>').addClass('jScrollCap jScrollCapTop').css({height:settings.topCapHeight}),$('<div></div>').attr({'className':'jScrollPaneTrack'}).css({'width':settings.scrollbarWidth+'px'}).append($('<div></div>').attr({'className':'jScrollPaneDrag'}).css({'width':settings.scrollbarWidth+'px'}).append($('<div></div>').attr({'className':'jScrollPaneDragTop'}).css({'width':settings.scrollbarWidth+'px'}),$('<div></div>').attr({'className':'jScrollPaneDragBottom'}).css({'width':settings.scrollbarWidth+'px'}))),$('<div></div>').addClass('jScrollCap jScrollCapBottom').css({height:settings.bottomCapHeight}));var $track=$('>.jScrollPaneTrack',$container);var $drag=$('>.jScrollPaneTrack .jScrollPaneDrag',$container);var currentArrowDirection;var currentArrowTimerArr=[];var currentArrowInc;var whileArrowButtonDown=function()
{if(currentArrowInc>4||currentArrowInc%4==0){positionDrag(dragPosition+currentArrowDirection*mouseWheelMultiplier);}
currentArrowInc++;};if(settings.enableKeyboardNavigation){$container.bind('keydown.jscrollpane',function(e)
{switch(e.keyCode){case 38:currentArrowDirection=-1;currentArrowInc=0;whileArrowButtonDown();currentArrowTimerArr[currentArrowTimerArr.length]=setInterval(whileArrowButtonDown,100);return false;case 40:currentArrowDirection=1;currentArrowInc=0;whileArrowButtonDown();currentArrowTimerArr[currentArrowTimerArr.length]=setInterval(whileArrowButtonDown,100);return false;case 33:case 34:return false;default:}}).bind('keyup.jscrollpane',function(e)
{if(e.keyCode==38||e.keyCode==40){for(var i=0;i<currentArrowTimerArr.length;i++){clearInterval(currentArrowTimerArr[i]);}
return false;}});}
if(settings.showArrows){var currentArrowButton;var currentArrowInterval;var onArrowMouseUp=function(event)
{$('html').unbind('mouseup',onArrowMouseUp);currentArrowButton.removeClass('jScrollActiveArrowButton');clearInterval(currentArrowInterval);};var onArrowMouseDown=function(){$('html').bind('mouseup',onArrowMouseUp);currentArrowButton.addClass('jScrollActiveArrowButton');currentArrowInc=0;whileArrowButtonDown();currentArrowInterval=setInterval(whileArrowButtonDown,100);};$container.append($('<a></a>').attr({'href':'javascript:;','className':'jScrollArrowUp','tabindex':-1}).css({'width':settings.scrollbarWidth+'px','top':settings.topCapHeight+'px'}).html('Scroll up').bind('mousedown',function()
{currentArrowButton=$(this);currentArrowDirection=-1;onArrowMouseDown();this.blur();return false;}).bind('click',rf),$('<a></a>').attr({'href':'javascript:;','className':'jScrollArrowDown','tabindex':-1}).css({'width':settings.scrollbarWidth+'px','bottom':settings.bottomCapHeight+'px'}).html('Scroll down').bind('mousedown',function()
{currentArrowButton=$(this);currentArrowDirection=1;onArrowMouseDown();this.blur();return false;}).bind('click',rf));var $upArrow=$('>.jScrollArrowUp',$container);var $downArrow=$('>.jScrollArrowDown',$container);}
if(settings.arrowSize){trackHeight=paneHeight-settings.arrowSize-settings.arrowSize;trackOffset+=settings.arrowSize;}else if($upArrow){var topArrowHeight=$upArrow.height();settings.arrowSize=topArrowHeight;trackHeight=paneHeight-topArrowHeight-$downArrow.height();trackOffset+=topArrowHeight;}
trackHeight-=settings.topCapHeight+settings.bottomCapHeight;$track.css({'height':trackHeight+'px',top:trackOffset+'px'})
var $pane=$(this).css({'position':'absolute','overflow':'visible'});var currentOffset;var maxY;var mouseWheelMultiplier;var dragPosition=0;var dragMiddle=percentInView*paneHeight/2;var getPos=function(event,c){var p=c=='X'?'Left':'Top';return event['page'+c]||(event['client'+c]+(document.documentElement['scroll'+p]||document.body['scroll'+p]))||0;};var ignoreNativeDrag=function(){return false;};var initDrag=function()
{ceaseAnimation();currentOffset=$drag.offset(false);currentOffset.top-=dragPosition;maxY=trackHeight-$drag[0].offsetHeight;mouseWheelMultiplier=2*settings.wheelSpeed*maxY/contentHeight;};var onStartDrag=function(event)
{initDrag();dragMiddle=getPos(event,'Y')-dragPosition-currentOffset.top;$('html').bind('mouseup',onStopDrag).bind('mousemove',updateScroll);if($.browser.msie){$('html').bind('dragstart',ignoreNativeDrag).bind('selectstart',ignoreNativeDrag);}
return false;};var onStopDrag=function()
{$('html').unbind('mouseup',onStopDrag).unbind('mousemove',updateScroll);dragMiddle=percentInView*paneHeight/2;if($.browser.msie){$('html').unbind('dragstart',ignoreNativeDrag).unbind('selectstart',ignoreNativeDrag);}};var positionDrag=function(destY)
{$container.scrollTop(0);destY=destY<0?0:(destY>maxY?maxY:destY);dragPosition=destY;$drag.css({'top':destY+'px'});var p=destY/maxY;$this.data('jScrollPanePosition',(paneHeight-contentHeight)*-p);$pane.css({'top':((paneHeight-contentHeight)*p)+'px'});$this.trigger('scroll');if(settings.showArrows){$upArrow[destY==0?'addClass':'removeClass']('disabled');$downArrow[destY==maxY?'addClass':'removeClass']('disabled');}};var updateScroll=function(e)
{positionDrag(getPos(e,'Y')-currentOffset.top-dragMiddle);};var dragH=Math.max(Math.min(percentInView*(paneHeight-settings.arrowSize*2),settings.dragMaxHeight),settings.dragMinHeight);$drag.css({'height':dragH+'px'}).bind('mousedown',onStartDrag);var trackScrollInterval;var trackScrollInc;var trackScrollMousePos;var doTrackScroll=function()
{if(trackScrollInc>8||trackScrollInc%4==0){positionDrag((dragPosition-((dragPosition-trackScrollMousePos)/2)));}
trackScrollInc++;};var onStopTrackClick=function()
{clearInterval(trackScrollInterval);$('html').unbind('mouseup',onStopTrackClick).unbind('mousemove',onTrackMouseMove);};var onTrackMouseMove=function(event)
{trackScrollMousePos=getPos(event,'Y')-currentOffset.top-dragMiddle;};var onTrackClick=function(event)
{initDrag();onTrackMouseMove(event);trackScrollInc=0;$('html').bind('mouseup',onStopTrackClick).bind('mousemove',onTrackMouseMove);trackScrollInterval=setInterval(doTrackScroll,100);doTrackScroll();return false;};$track.bind('mousedown',onTrackClick);$container.bind('mousewheel',function(event,delta){delta=delta||(event.wheelDelta?event.wheelDelta/120:(event.detail)?-event.detail/3:0);initDrag();ceaseAnimation();var d=dragPosition;positionDrag(dragPosition-delta*mouseWheelMultiplier);var dragOccured=d!=dragPosition;return!dragOccured;});var _animateToPosition;var _animateToInterval;function animateToPosition()
{var diff=(_animateToPosition-dragPosition)/settings.animateStep;if(diff>1||diff<-1){positionDrag(dragPosition+diff);}else{positionDrag(_animateToPosition);ceaseAnimation();}}
var ceaseAnimation=function()
{if(_animateToInterval){clearInterval(_animateToInterval);delete _animateToPosition;}};var scrollTo=function(pos,preventAni)
{if(typeof pos=="string"){try{$e=$(pos,$this);}catch(err){return;}
if(!$e.length)return;pos=$e.offset().top-$this.offset().top;}
ceaseAnimation();var maxScroll=contentHeight-paneHeight;pos=pos>maxScroll?maxScroll:pos;$this.data('jScrollPaneMaxScroll',maxScroll);var destDragPosition=pos/maxScroll*maxY;if(preventAni||!settings.animateTo){positionDrag(destDragPosition);}else{$container.scrollTop(0);_animateToPosition=destDragPosition;_animateToInterval=setInterval(animateToPosition,settings.animateInterval);}};$this[0].scrollTo=scrollTo;$this[0].scrollBy=function(delta)
{var currentPos=-parseInt($pane.css('top'))||0;scrollTo(currentPos+delta);};initDrag();scrollTo(-currentScrollPosition,true);$('*',this).bind('focus',function(event)
{var $e=$(this);var eleTop=0;while($e[0]!=$this[0]){eleTop+=$e.position().top;$e=$e.offsetParent();}
var viewportTop=-parseInt($pane.css('top'))||0;var maxVisibleEleTop=viewportTop+paneHeight;var eleInView=eleTop>viewportTop&&eleTop<maxVisibleEleTop;if(!eleInView){var destPos=eleTop-settings.scrollbarMargin;if(eleTop>viewportTop){destPos+=$(this).height()+15+settings.scrollbarMargin-paneHeight;}
scrollTo(destPos);}})
if(settings.observeHash){if(location.hash&&location.hash.length>1){setTimeout(function(){scrollTo(location.hash);},$.browser.safari?100:0);}
$(document).bind('click',function(e){$target=$(e.target);if($target.is('a')){var h=$target.attr('href');if(h&&h.substr(0,1)=='#'&&h.length>1){setTimeout(function(){scrollTo(h,!settings.animateToInternalLinks);},$.browser.safari?100:0);}}});}
function onSelectScrollMouseDown(e)
{$(document).bind('mousemove.jScrollPaneDragging',onTextSelectionScrollMouseMove);$(document).bind('mouseup.jScrollPaneDragging',onSelectScrollMouseUp);}
var textDragDistanceAway;var textSelectionInterval;function onTextSelectionInterval()
{direction=textDragDistanceAway<0?-1:1;$this[0].scrollBy(textDragDistanceAway/2);}
function clearTextSelectionInterval()
{if(textSelectionInterval){clearInterval(textSelectionInterval);textSelectionInterval=undefined;}}
function onTextSelectionScrollMouseMove(e)
{var offset=$this.parent().offset().top;var maxOffset=offset+paneHeight;var mouseOffset=getPos(e,'Y');textDragDistanceAway=mouseOffset<offset?mouseOffset-offset:(mouseOffset>maxOffset?mouseOffset-maxOffset:0);if(textDragDistanceAway==0){clearTextSelectionInterval();}else{if(!textSelectionInterval){textSelectionInterval=setInterval(onTextSelectionInterval,100);}}}
function onSelectScrollMouseUp(e)
{$(document).unbind('mousemove.jScrollPaneDragging').unbind('mouseup.jScrollPaneDragging');clearTextSelectionInterval();}
$container.bind('mousedown.jScrollPane',onSelectScrollMouseDown);$.jScrollPane.active.push($this[0]);}else{$this.css({'height':paneHeight+'px','width':paneWidth-this.originalSidePaddingTotal+'px','padding':this.originalPadding});$this[0].scrollTo=$this[0].scrollBy=function(){};$this.parent().unbind('mousewheel').unbind('mousedown.jScrollPane').unbind('keydown.jscrollpane').unbind('keyup.jscrollpane');}})};$.fn.jScrollPaneRemove=function()
{$(this).each(function()
{$this=$(this);var $c=$this.parent();if($c.is('.jScrollPaneContainer')){$this.css({'top':'','height':'','width':'','padding':'','overflow':'','position':''});$this.attr('style',$this.data('originalStyleTag'));$c.after($this).remove();}});}
$.fn.jScrollPane.defaults={scrollbarWidth:10,scrollbarMargin:5,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true,scrollbarOnLeft:false,reinitialiseOnImageLoad:false,tabIndex:0,enableKeyboardNavigation:true,animateToInternalLinks:false,topCapHeight:0,bottomCapHeight:0,observeHash:true};$(window).bind('unload',function(){var els=$.jScrollPane.active;for(var i=0;i<els.length;i++){els[i].scrollTo=els[i].scrollBy=null;}});})(jQuery);;var jsReady=false;var acPlayerReady=false;var VIDEO_PLAYER_ID="VideoPlayer";function getSWF(playerID){var player=$('#'+playerID);if(player.length>0){return player[0];}
else{return null;}}
function isPageReady(){acPlayerReady=jsReady;return jsReady;}
function init(){jsReady=true;}
function play(){getSWF(VIDEO_PLAYER_ID).playClip();}
function play(id){getSWF(id).playClip();}
function stop(){getSWF(VIDEO_PLAYER_ID).stopClip();}
function stop(id){getSWF(id).stopClip();}
function setClip(){var code=document.getElementById("clipCode").value;getSWF(VIDEO_PLAYER_ID).setClip(code);}
function setClip(id,code){getSWF(id).setClip(code);}
function pause(){getSWF(VIDEO_PLAYER_ID).pauseClip();}
function setVolume(){var volume=document.getElementById("clipVolume").value;getSWF(VIDEO_PLAYER_ID).setClipVolume(volume);}
function getVolume(){var volume=getSWF(VIDEO_PLAYER_ID).getClipVolume();document.getElementById("clipVolumeGet").value=volume;}
function getPosition(){var position=getSWF(VIDEO_PLAYER_ID).getClipPosition();document.getElementById("clipPositionGet").value=position;}
function setPosition(){var position=document.getElementById("clipPositionSet").value;getSWF(VIDEO_PLAYER_ID).setClipPosition(position);}
function getDuration(){var duration=getSWF(VIDEO_PLAYER_ID).getClipDuration();document.getElementById("clipDuration").value=duration;}
function getState(){var state=getSWF(VIDEO_PLAYER_ID).getState();return state;}
function getClipCodeC(player_id){var swf_player=getSWF(player_id);var code=swf_player.getClipCode();return code;}
function getCurrentDuration(){var swf_p=getSWF("VideoEditPlayer");var duration=swf_p.getCurrentDuration();return duration;};jQuery(document).ready(function($){var button1=$('button.section1');var button2=$('button.section2');var section1=$('div.section1');var section2=$('div.section2');section1.css({'display':'block'});section2.css({'display':'none'});button1.click(function(){section1.css({'display':'block'});section2.css({'display':'none'});});button2.click(function(){section1.css({'display':'none'});section2.css({'display':'block'});});});;jQuery(document).ready(function($){$(".scrollbar").jScrollPane({showArrows:true,scrollbarWidth:12});});;jQuery(document).ready(function($){var openText=$('.open-text');var closeText=$('.close-text');var targetText=$('.target-text');targetText.hide();openText.click(function(){targetText.fadeIn('slow');});closeText.click(function(){targetText.fadeOut('slow');});});;function toggle_favorite(is_fav,type,code,$button)
{if(!is_fav)
{$.ajax({type:'post',url:fav_service_url,dataType:'json',data:{code:code,type:type},success:function(){$button.trigger('added_favorite');}});$button.children('span').html(fav_button_labels['true']).end().parents('.favorite').addClass('is_fav').removeClass('isnt_fav').end().trigger('blur');}
else
{}}
$('.favorite button').bind('click',function()
{var $button=$(this);var is_fav=$button.parent('.favorite').hasClass('is_fav');var item_info=$button.attr('id').match(/add-fav-([^_]*)_([^_]*)/);var item_type=item_info[1];var item_code=item_info[2];if(!fav_user_logged){$.login_lightbox({refresh_page:true,success:function()
{toggle_favorite(is_fav,item_type,item_code,$button);}});}
else{toggle_favorite(is_fav,item_type,item_code,$button);}}).bind('mouseenter focus',function()
{var self=this;if(!$(this).siblings('.tooltip').length)
{$('<span/>').addClass('tooltip').html($(this).children('span').html()).bind('mouseleave',function(){$(self).trigger('blur');}).insertAfter(self);}}).bind('mouseleave blur',function(e)
{if(!e.relatedTarget||!$(e.relatedTarget).is('.tooltip'))
{$(this).siblings('.tooltip').remove();}});;$(document).ready(function(){$('div.similar-moments > .show-results').live('click',function(){$parentDiv=$(this).parent();if($parentDiv.children().length>1)
{$parentDiv.children().toggle();}
else
{$(this).hide();$.get(this.href,{format:'text'},function(data,textStatus,XMLHttpRequest)
{$parentDiv.append(data);});}
return false;});$('div.similar-moments > .hide-results').live('click',function(){$(this).parent().children().toggle();});$('div.similar-moments > .hide-results').hide();$('div.similar-moments > ul').hide();});;
/*
 * jQuery Form Plugin
 * version: 2.43 (12-MAR-2010)
 * @requires jQuery v1.3.2 or later
 *
 * Examples and documentation at: http://malsup.com/jquery/form/
 * Dual licensed under the MIT and GPL licenses:
 *   http://www.opensource.org/licenses/mit-license.php
 *   http://www.gnu.org/licenses/gpl.html
 */
;(function($){$.fn.ajaxSubmit=function(options){if(!this.length){log('ajaxSubmit: skipping submit process - no element selected');return this;}
if(typeof options=='function')
options={success:options};var url=$.trim(this.attr('action'));if(url){url=(url.match(/^([^#]+)/)||[])[1];}
url=url||window.location.href||'';options=$.extend({url:url,type:this.attr('method')||'GET',iframeSrc:/^https/i.test(window.location.href||'')?'javascript:false':'about:blank'},options||{});var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this;}
if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log('ajaxSubmit: submit aborted via beforeSerialize callback');return this;}
var a=this.formToArray(options.semantic);if(options.data){options.extraData=options.data;for(var n in options.data){if(options.data[n]instanceof Array){for(var k in options.data[n])
a.push({name:n,value:options.data[n][k]});}
else
a.push({name:n,value:options.data[n]});}}
if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this;}
this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this;}
var q=$.param(a);if(options.type.toUpperCase()=='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null;}
else
options.data=q;var $form=this,callbacks=[];if(options.resetForm)callbacks.push(function(){$form.resetForm();});if(options.clearForm)callbacks.push(function(){$form.clearForm();});if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data){var fn=options.replaceTarget?'replaceWith':'html';$(options.target)[fn](data).each(oldSuccess,arguments);});}
else if(options.success)
callbacks.push(options.success);options.success=function(data,status,xhr){for(var i=0,max=callbacks.length;i<max;i++)
callbacks[i].apply(options,[data,status,xhr||$form,$form]);};var files=$('input:file',this).fieldValue();var found=false;for(var j=0;j<files.length;j++)
if(files[j])
found=true;var multipart=false;if((files.length&&options.iframe!==false)||options.iframe||found||multipart){if(options.closeKeepAlive)
$.get(options.closeKeepAlive,fileUpload);else
fileUpload();}
else
$.ajax(options);this.trigger('form-submit-notify',[this,options]);return this;function fileUpload(){var form=$form[0];if($(':input[name=submit]',form).length){alert('Error: Form elements must not be named "submit".');return;}
var opts=$.extend({},$.ajaxSettings,options);var s=$.extend(true,{},$.extend(true,{},$.ajaxSettings),opts);var id='jqFormIO'+(new Date().getTime());var $io=$('<iframe id="'+id+'" name="'+id+'" src="'+opts.iframeSrc+'" onload="(jQuery(this).data(\'form-plugin-onload\'))()" />');var io=$io[0];$io.css({position:'absolute',top:'-1000px',left:'-1000px'});var xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;$io.attr('src',opts.iframeSrc);}};var g=opts.global;if(g&&!$.active++)$.event.trigger("ajaxStart");if(g)$.event.trigger("ajaxSend",[xhr,opts]);if(s.beforeSend&&s.beforeSend(xhr,s)===false){s.global&&$.active--;return;}
if(xhr.aborted)
return;var cbInvoked=false;var timedOut=0;var sub=form.clk;if(sub){var n=sub.name;if(n&&!sub.disabled){opts.extraData=opts.extraData||{};opts.extraData[n]=sub.value;if(sub.type=="image"){opts.extraData[n+'.x']=form.clk_x;opts.extraData[n+'.y']=form.clk_y;}}}
function doSubmit(){var t=$form.attr('target'),a=$form.attr('action');form.setAttribute('target',id);if(form.getAttribute('method')!='POST')
form.setAttribute('method','POST');if(form.getAttribute('action')!=opts.url)
form.setAttribute('action',opts.url);if(!opts.skipEncodingOverride){$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'});}
if(opts.timeout)
setTimeout(function(){timedOut=true;cb();},opts.timeout);var extraInputs=[];try{if(opts.extraData)
for(var n in opts.extraData)
extraInputs.push($('<input type="hidden" name="'+n+'" value="'+opts.extraData[n]+'" />').appendTo(form)[0]);$io.appendTo('body');$io.data('form-plugin-onload',cb);form.submit();}
finally{form.setAttribute('action',a);t?form.setAttribute('target',t):$form.removeAttr('target');$(extraInputs).remove();}};if(opts.forceSync)
doSubmit();else
setTimeout(doSubmit,10);var domCheckCount=100;function cb(){if(cbInvoked)
return;var ok=true;try{if(timedOut)throw'timeout';var data,doc;doc=io.contentWindow?io.contentWindow.document:io.contentDocument?io.contentDocument:io.document;var isXml=opts.dataType=='xml'||doc.XMLDocument||$.isXMLDoc(doc);log('isXml='+isXml);if(!isXml&&(doc.body==null||doc.body.innerHTML=='')){if(--domCheckCount){log('requeing onLoad callback, DOM not available');setTimeout(cb,250);return;}
log('Could not access iframe DOM after 100 tries.');return;}
log('response detected');cbInvoked=true;xhr.responseText=doc.body?doc.body.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;xhr.getResponseHeader=function(header){var headers={'content-type':opts.dataType};return headers[header];};if(opts.dataType=='json'||opts.dataType=='script'){var ta=doc.getElementsByTagName('textarea')[0];if(ta)
xhr.responseText=ta.value;else{var pre=doc.getElementsByTagName('pre')[0];if(pre)
xhr.responseText=pre.innerHTML;}}
else if(opts.dataType=='xml'&&!xhr.responseXML&&xhr.responseText!=null){xhr.responseXML=toXml(xhr.responseText);}
data=$.httpData(xhr,opts.dataType);}
catch(e){log('error caught:',e);ok=false;xhr.error=e;$.handleError(opts,xhr,'error',e);}
if(ok){opts.success(data,'success');if(g)$.event.trigger("ajaxSuccess",[xhr,opts]);}
if(g)$.event.trigger("ajaxComplete",[xhr,opts]);if(g&&!--$.active)$.event.trigger("ajaxStop");if(opts.complete)opts.complete(xhr,ok?'success':'error');setTimeout(function(){$io.removeData('form-plugin-onload');$io.remove();xhr.responseXML=null;},100);};function toXml(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);}
else
doc=(new DOMParser()).parseFromString(s,'text/xml');return(doc&&doc.documentElement&&doc.documentElement.tagName!='parsererror')?doc:null;};};};$.fn.ajaxForm=function(options){return this.ajaxFormUnbind().bind('submit.form-plugin',function(e){e.preventDefault();$(this).ajaxSubmit(options);}).bind('click.form-plugin',function(e){var target=e.target;var $el=$(target);if(!($el.is(":submit,input:image"))){var t=$el.closest(':submit');if(t.length==0)
return;target=t[0];}
var form=this;form.clk=target;if(target.type=='image'){if(e.offsetX!=undefined){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else if(typeof $.fn.offset=='function'){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop;}}
setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},100);});};$.fn.ajaxFormUnbind=function(){return this.unbind('submit.form-plugin click.form-plugin');};$.fn.formToArray=function(semantic){var a=[];if(this.length==0)return a;var form=this[0];var els=semantic?form.getElementsByTagName('*'):form.elements;if(!els)return a;for(var i=0,max=els.length;i<max;i++){var el=els[i];var n=el.name;if(!n)continue;if(semantic&&form.clk&&el.type=="image"){if(!el.disabled&&form.clk==el){a.push({name:n,value:$(el).val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}
continue;}
var v=$.fieldValue(el,true);if(v&&v.constructor==Array){for(var j=0,jmax=v.length;j<jmax;j++)
a.push({name:n,value:v[j]});}
else if(v!==null&&typeof v!='undefined')
a.push({name:n,value:v});}
if(!semantic&&form.clk){var $input=$(form.clk),input=$input[0],n=input.name;if(n&&!input.disabled&&input.type=='image'){a.push({name:n,value:$input.val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}}
return a;};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n)return;var v=$.fieldValue(this,successful);if(v&&v.constructor==Array){for(var i=0,max=v.length;i<max;i++)
a.push({name:n,value:v[i]});}
else if(v!==null&&typeof v!='undefined')
a.push({name:this.name,value:v});});return $.param(a);};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v=='undefined'||(v.constructor==Array&&!v.length))
continue;v.constructor==Array?$.merge(val,v):val.push(v);}
return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof successful=='undefined')successful=true;if(successful&&(!n||el.disabled||t=='reset'||t=='button'||(t=='checkbox'||t=='radio')&&!el.checked||(t=='submit'||t=='image')&&el.form&&el.form.clk!=el||tag=='select'&&el.selectedIndex==-1))
return null;if(tag=='select'){var index=el.selectedIndex;if(index<0)return null;var a=[],ops=el.options;var one=(t=='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected){var v=op.value;if(!v)
v=(op.attributes&&op.attributes['value']&&!(op.attributes['value'].specified))?op.text:op.value;if(one)return v;a.push(v);}}
return a;}
return el.value;};$.fn.clearForm=function(){return this.each(function(){$('input,select,textarea',this).clearFields();});};$.fn.clearFields=$.fn.clearInputs=function(){return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(t=='text'||t=='password'||tag=='textarea')
this.value='';else if(t=='checkbox'||t=='radio')
this.checked=false;else if(tag=='select')
this.selectedIndex=-1;});};$.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=='function'||(typeof this.reset=='object'&&!this.reset.nodeType))
this.reset();});};$.fn.enable=function(b){if(b==undefined)b=true;return this.each(function(){this.disabled=!b;});};$.fn.selected=function(select){if(select==undefined)select=true;return this.each(function(){var t=this.type;if(t=='checkbox'||t=='radio')
this.checked=select;else if(this.tagName.toLowerCase()=='option'){var $sel=$(this).parent('select');if(select&&$sel[0]&&$sel[0].type=='select-one'){$sel.find('option').selected(false);}
this.selected=select;}});};function log(){if($.fn.ajaxSubmit.debug){var msg='[jquery.form] '+Array.prototype.join.call(arguments,'');if(window.console&&window.console.log)
window.console.log(msg);else if(window.opera&&window.opera.postError)
window.opera.postError(msg);}};})(jQuery);;
/* SWFObject v2.2 <http://code.google.com/p/swfobject/> 
 is released under the MIT License <http://www.opensource.org/licenses/mit-license.php> 
*/
var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",ON_READY_STATE_CHANGE="onreadystatechange",win=window,doc=document,nav=navigator,plugin=false,domLoadFnArr=[main],regObjArr=[],objIdArr=[],listenersArr=[],storedAltContent,storedAltContentId,storedCallbackFn,storedCallbackObj,isDomLoaded=false,isExpressInstallActive=false,dynamicStylesheet,dynamicStylesheetMedia,autoHideShow=true,ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=!+"\v1",playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){plugin=true;ie=false;d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/[a-zA-Z]/.test(d)?parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0;}}
else if(typeof win.ActiveXObject!=UNDEF){try{var a=new ActiveXObject(SHOCKWAVE_FLASH_AX);if(a){d=a.GetVariable("$version");if(d){ie=true;d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}}}
catch(e){}}
return{w3:w3cdom,pv:playerVersion,wk:webkit,ie:ie,win:windows,mac:mac};}(),onDomLoad=function(){if(!ua.w3){return;}
if((typeof doc.readyState!=UNDEF&&doc.readyState=="complete")||(typeof doc.readyState==UNDEF&&(doc.getElementsByTagName("body")[0]||doc.body))){callDomLoadFunctions();}
if(!isDomLoaded){if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,false);}
if(ua.ie&&ua.win){doc.attachEvent(ON_READY_STATE_CHANGE,function(){if(doc.readyState=="complete"){doc.detachEvent(ON_READY_STATE_CHANGE,arguments.callee);callDomLoadFunctions();}});if(win==top){(function(){if(isDomLoaded){return;}
try{doc.documentElement.doScroll("left");}
catch(e){setTimeout(arguments.callee,0);return;}
callDomLoadFunctions();})();}}
if(ua.wk){(function(){if(isDomLoaded){return;}
if(!/loaded|complete/.test(doc.readyState)){setTimeout(arguments.callee,0);return;}
callDomLoadFunctions();})();}
addLoadEvent(callDomLoadFunctions);}}();function callDomLoadFunctions(){if(isDomLoaded){return;}
try{var t=doc.getElementsByTagName("body")[0].appendChild(createElement("span"));t.parentNode.removeChild(t);}
catch(e){return;}
isDomLoaded=true;var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]();}}
function addDomLoadEvent(fn){if(isDomLoaded){fn();}
else{domLoadFnArr[domLoadFnArr.length]=fn;}}
function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false);}
else if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false);}
else if(typeof win.attachEvent!=UNDEF){addListener(win,"onload",fn);}
else if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn();};}
else{win.onload=fn;}}
function main(){if(plugin){testPlayerVersion();}
else{matchVersions();}}
function testPlayerVersion(){var b=doc.getElementsByTagName("body")[0];var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);var t=b.appendChild(o);if(t){var counter=0;(function(){if(typeof t.GetVariable!=UNDEF){var d=t.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");ua.pv=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}}
else if(counter<10){counter++;setTimeout(arguments.callee,10);return;}
b.removeChild(o);t=null;matchVersions();})();}
else{matchVersions();}}
function matchVersions(){var rl=regObjArr.length;if(rl>0){for(var i=0;i<rl;i++){var id=regObjArr[i].id;var cb=regObjArr[i].callbackFn;var cbObj={success:false,id:id};if(ua.pv[0]>0){var obj=getElementById(id);if(obj){if(hasPlayerVersion(regObjArr[i].swfVersion)&&!(ua.wk&&ua.wk<312)){setVisibility(id,true);if(cb){cbObj.success=true;cbObj.ref=getObjectById(id);cb(cbObj);}}
else if(regObjArr[i].expressInstall&&canExpressInstall()){var att={};att.data=regObjArr[i].expressInstall;att.width=obj.getAttribute("width")||"0";att.height=obj.getAttribute("height")||"0";if(obj.getAttribute("class")){att.styleclass=obj.getAttribute("class");}
if(obj.getAttribute("align")){att.align=obj.getAttribute("align");}
var par={};var p=obj.getElementsByTagName("param");var pl=p.length;for(var j=0;j<pl;j++){if(p[j].getAttribute("name").toLowerCase()!="movie"){par[p[j].getAttribute("name")]=p[j].getAttribute("value");}}
showExpressInstall(att,par,id,cb);}
else{displayAltContent(obj);if(cb){cb(cbObj);}}}}
else{setVisibility(id,true);if(cb){var o=getObjectById(id);if(o&&typeof o.SetVariable!=UNDEF){cbObj.success=true;cbObj.ref=o;}
cb(cbObj);}}}}}
function getObjectById(objectIdStr){var r=null;var o=getElementById(objectIdStr);if(o&&o.nodeName=="OBJECT"){if(typeof o.SetVariable!=UNDEF){r=o;}
else{var n=o.getElementsByTagName(OBJECT)[0];if(n){r=n;}}}
return r;}
function canExpressInstall(){return!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)&&!(ua.wk&&ua.wk<312);}
function showExpressInstall(att,par,replaceElemIdStr,callbackFn){isExpressInstallActive=true;storedCallbackFn=callbackFn||null;storedCallbackObj={success:false,id:replaceElemIdStr};var obj=getElementById(replaceElemIdStr);if(obj){if(obj.nodeName=="OBJECT"){storedAltContent=abstractAltContent(obj);storedAltContentId=null;}
else{storedAltContent=obj;storedAltContentId=replaceElemIdStr;}
att.id=EXPRESS_INSTALL_ID;if(typeof att.width==UNDEF||(!/%$/.test(att.width)&&parseInt(att.width,10)<310)){att.width="310";}
if(typeof att.height==UNDEF||(!/%$/.test(att.height)&&parseInt(att.height,10)<137)){att.height="137";}
doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",fv="MMredirectURL="+win.location.toString().replace(/&/g,"%26")+"&MMplayerType="+pt+"&MMdoctitle="+doc.title;if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+fv;}
else{par.flashvars=fv;}
if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceElemIdStr+="SWFObjectNew";newObj.setAttribute("id",replaceElemIdStr);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";(function(){if(obj.readyState==4){obj.parentNode.removeChild(obj);}
else{setTimeout(arguments.callee,10);}})();}
createSWF(att,par,replaceElemIdStr);}}
function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";(function(){if(obj.readyState==4){obj.parentNode.removeChild(obj);}
else{setTimeout(arguments.callee,10);}})();}
else{obj.parentNode.replaceChild(abstractAltContent(obj),obj);}}
function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML;}
else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true));}}}}}
return ac;}
function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(ua.wk&&ua.wk<312){return r;}
if(el){if(typeof attObj.id==UNDEF){attObj.id=id;}
if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){parObj.movie=attObj[i];}
else if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"';}
else if(i.toLowerCase()!="classid"){att+=' '+i+'="'+attObj[i]+'"';}}}
var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />';}}
el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+'>'+par+'</object>';objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id);}
else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m]);}
else if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m]);}}}
for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n]);}}
el.parentNode.replaceChild(o,el);r=o;}}
return r;}
function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p);}
function removeSWF(id){var obj=getElementById(id);if(obj&&obj.nodeName=="OBJECT"){if(ua.ie&&ua.win){obj.style.display="none";(function(){if(obj.readyState==4){removeObjectInIE(id);}
else{setTimeout(arguments.callee,10);}})();}
else{obj.parentNode.removeChild(obj);}}}
function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null;}}
obj.parentNode.removeChild(obj);}}
function getElementById(id){var el=null;try{el=doc.getElementById(id);}
catch(e){}
return el;}
function createElement(el){return doc.createElement(el);}
function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn];}
function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false;}
function createCSS(sel,decl,media,newStyle){if(ua.ie&&ua.mac){return;}
var h=doc.getElementsByTagName("head")[0];if(!h){return;}
var m=(media&&typeof media=="string")?media:"screen";if(newStyle){dynamicStylesheet=null;dynamicStylesheetMedia=null;}
if(!dynamicStylesheet||dynamicStylesheetMedia!=m){var s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media",m);dynamicStylesheet=h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){dynamicStylesheet=doc.styleSheets[doc.styleSheets.length-1];}
dynamicStylesheetMedia=m;}
if(ua.ie&&ua.win){if(dynamicStylesheet&&typeof dynamicStylesheet.addRule==OBJECT){dynamicStylesheet.addRule(sel,decl);}}
else{if(dynamicStylesheet&&typeof doc.createTextNode!=UNDEF){dynamicStylesheet.appendChild(doc.createTextNode(sel+" {"+decl+"}"));}}}
function setVisibility(id,isVisible){if(!autoHideShow){return;}
var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v;}
else{createCSS("#"+id,"visibility:"+v);}}
function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars&&typeof encodeURIComponent!=UNDEF?encodeURIComponent(s):s;}
var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i<ll;i++){listenersArr[i][0].detachEvent(listenersArr[i][1],listenersArr[i][2]);}
var il=objIdArr.length;for(var j=0;j<il;j++){removeSWF(objIdArr[j]);}
for(var k in ua){ua[k]=null;}
ua=null;for(var l in swfobject){swfobject[l]=null;}
swfobject=null;});}}();return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr,callbackFn){if(ua.w3&&objectIdStr&&swfVersionStr){var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr;regObj.callbackFn=callbackFn;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false);}
else if(callbackFn){callbackFn({success:false,id:objectIdStr});}},getObjectById:function(objectIdStr){if(ua.w3){return getObjectById(objectIdStr);}},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj,callbackFn){var callbackObj={success:false,id:replaceElemIdStr};if(ua.w3&&!(ua.wk&&ua.wk<312)&&swfUrlStr&&replaceElemIdStr&&widthStr&&heightStr&&swfVersionStr){setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){widthStr+="";heightStr+="";var att={};if(attObj&&typeof attObj===OBJECT){for(var i in attObj){att[i]=attObj[i];}}
att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par={};if(parObj&&typeof parObj===OBJECT){for(var j in parObj){par[j]=parObj[j];}}
if(flashvarsObj&&typeof flashvarsObj===OBJECT){for(var k in flashvarsObj){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+k+"="+flashvarsObj[k];}
else{par.flashvars=k+"="+flashvarsObj[k];}}}
if(hasPlayerVersion(swfVersionStr)){var obj=createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true);}
callbackObj.success=true;callbackObj.ref=obj;}
else if(xiSwfUrlStr&&canExpressInstall()){att.data=xiSwfUrlStr;showExpressInstall(att,par,replaceElemIdStr,callbackFn);return;}
else{setVisibility(replaceElemIdStr,true);}
if(callbackFn){callbackFn(callbackObj);}});}
else if(callbackFn){callbackFn(callbackObj);}},switchOffAutoHideShow:function(){autoHideShow=false;},ua:ua,getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]};},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3){return createSWF(attObj,parObj,replaceElemIdStr);}
else{return undefined;}},showExpressInstall:function(att,par,replaceElemIdStr,callbackFn){if(ua.w3&&canExpressInstall()){showExpressInstall(att,par,replaceElemIdStr,callbackFn);}},removeSWF:function(objElemIdStr){if(ua.w3){removeSWF(objElemIdStr);}},createCSS:function(selStr,declStr,mediaStr,newStyleBoolean){if(ua.w3){createCSS(selStr,declStr,mediaStr,newStyleBoolean);}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(q){if(/\?/.test(q)){q=q.split("?")[1];}
if(param==null){return urlEncodeIfNecessary(q);}
var pairs=q.split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=")+1)));}}}
return"";},expressInstallCallback:function(){if(isExpressInstallActive){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj&&storedAltContent){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block";}}
if(storedCallbackFn){storedCallbackFn(storedCallbackObj);}}
isExpressInstallActive=false;}}};}();;(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);;(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');};}}());;(function($){$.fn.menu_show=function(){return $(this).each(function(){if(!$(this).parent().hasClass('current'))
{$(this).show();$(this).parent().siblings('.current').children().hide();$('.menu-reveal').removeClass('hover').filter('[rel="'+$(this).attr('id')+'"]').addClass('hover');}});};$.fn.menu_hide=function(immediately){return $(this).each(function(){var $self=$(this);if(!$(this).parent().hasClass('current'))
{window.setTimeout(function(){if(!$self.data('hover')){$self.hide();$self.parent().siblings('.current').children().show();$('.menu-reveal[rel="'+$self.attr('id')+'"]').removeClass('hover');}},immediately?0:250);}});}
$.fn.menu_reveal=function(){return $(this).each(function(){var menuId=$(this).attr('rel');var $menu=$('#'+menuId).menu_hide(true);if($menu.length)
{$(this).bind('focus mouseenter',function(){$menu.menu_show();$menu.data('hover',true);}).bind('blur mouseleave',function(e){var $target=$(e.relatedTarget);if(!$target.is('#'+menuId)&&!$target.parents('#'+menuId).length){$menu.menu_hide($target.is('.menu-reveal'));$menu.data('hover',false);}});$menu.bind('focus mouseenter',function(){$(this).data('hover',true);}).bind('blur mouseleave',function(){$(this).menu_hide();$(this).data('hover',false);});}});}
$(document).ready(function()
{$('.menu-reveal').menu_reveal();});})(jQuery);