(function($){$.dimensions={version:'1.2'};$.each(['Height','Width'],function(i,name){$.fn['inner'+name]=function(){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';return this.is(':visible')?this[0]['client'+name]:num(this,name.toLowerCase())+num(this,'padding'+torl)+num(this,'padding'+borr);};$.fn['outer'+name]=function(options){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';options=$.extend({margin:false},options||{});var val=this.is(':visible')?this[0]['offset'+name]:num(this,name.toLowerCase())+num(this,'border'+torl+'Width')+num(this,'border'+borr+'Width')+num(this,'padding'+torl)+num(this,'padding'+borr);return val+(options.margin?(num(this,'margin'+torl)+num(this,'margin'+borr)):0);};});$.each(['Left','Top'],function(i,name){$.fn['scroll'+name]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=='Left'?val:$(window)['scrollLeft'](),name=='Top'?val:$(window)['scrollTop']()):this['scroll'+name]=val;}):this[0]==window||this[0]==document?self[(name=='Left'?'pageXOffset':'pageYOffset')]||$.boxModel&&document.documentElement['scroll'+name]||document.body['scroll'+name]:this[0]['scroll'+name];};});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,'marginTop');offset.left-=num(elem,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return $(offsetParent);}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;};})(jQuery);;function popup(url,height,width){var windowname='popupWindow';var left=(screen.width-width)/2;var top=(screen.height-height)/2;var params='width='+width+', height='+height;params+=', top='+top+', left='+left;params+=', directories=no';params+=', location=yes';params+=', menubar=no';params+=', resizable=no';params+=', scrollbars=yes';params+=', status=no';params+=', toolbar=no';newwin=window.open(url,windowname,params);if(window.focus){width=width+8;height=height+30;newwin.resizeTo(width,height);left=(screen.width-width)/2;top=(screen.height-height)/2;newwin.moveTo(left,top);newwin.focus();}
return false;}
$(function(){$(".news-item ").hover(function(){$(this).addClass("news-item-highlight");},function(){$(this).removeClass("news-item-highlight");});$('#video-selection-one').cycle({pause:1,random:1,timeout:12000,delay:4000});$('#video-selection-two').cycle({pause:1,random:1,timeout:12000,delay:8000});$('#video-selection-three').cycle({pause:1,random:1,timeout:12000,delay:12000});});;;(function($){$.fn.wheel=function(a){return this[a?"bind":"trigger"]("wheel",a)};$.event.special.wheel={setup:function(){$.event.add(this,b,wheelHandler,{})},teardown:function(){$.event.remove(this,b,wheelHandler)}};var b=!$.browser.mozilla?"mousewheel":"DOMMouseScroll"+($.browser.version<"1.9"?" mousemove":"");function wheelHandler(a){switch(a.type){case"mousemove":return $.extend(a.data,{clientX:a.clientX,clientY:a.clientY,pageX:a.pageX,pageY:a.pageY});case"DOMMouseScroll":$.extend(a,a.data);a.delta=-a.detail/3;break;case"mousewheel":a.delta=a.wheelDelta/120;if($.browser.opera)a.delta*=-1;break}a.type="wheel";return $.event.handle.call(this,a,a.delta)}})(jQuery);jQuery.fn.crawlLine=function(_options){var _options=jQuery.extend({speed:2,crawElement:'div',textElement:'p',hoverClass:'viewText'},_options);return this.each(function(){var _THIS=jQuery(this);var _el=$(_options.crawElement,_THIS).css('position','relative');var _text=$(_options.textElement,_THIS);var _clone=_text.css('whiteSpace','nowrap').clone();var _elWidth=0;var _k=1;var _textWidth=0;_text.each(function(){_textWidth+=$(this).outerWidth(true);});var _duration=_textWidth*50/_options.speed;_el.append(_clone);_el.css('width',_textWidth*2);var animate=function(){_el.animate({left:-_textWidth},{queue:false,duration:_duration*_k,easing:'linear',complete:function(){_el.css('left','0');_k=1;animate();}})}
animate();_THIS.hover(function(){_el.stop();_THIS.addClass(_options.hoverClass);},function(){_THIS.removeClass(_options.hoverClass);_k=(_textWidth+parseInt(_el.css('left')))/_textWidth;animate();})
_THIS.bind('wheel',function(event,delta){var _marginScroll;if(delta<0){_marginScroll=parseInt(_el.css('left'))-20;_el.animate({left:_marginScroll},{queue:false,duration:100,easing:'linear',complete:function(){_k=(_textWidth+parseInt(_el.css('left')))/_textWidth;}});}else{_marginScroll=parseInt(_el.css('left'))+20;if(_marginScroll>0)_marginScroll=0;_el.animate({left:_marginScroll},{queue:false,duration:100,easing:'linear',complete:function(){_k=(_textWidth+parseInt(_el.css('left')))/_textWidth;}});}
return false;});});};var FCKeditor=function(instanceName,width,height,toolbarSet,value)
{this.InstanceName=instanceName;this.Width=width||'100%';this.Height=height||'200';this.ToolbarSet=toolbarSet||'Default';this.Value=value||'';this.BasePath=FCKeditor.BasePath;this.CheckBrowser=true;this.DisplayErrors=true;this.Config=new Object();this.OnError=null;}
FCKeditor.BasePath='/fckeditor/';FCKeditor.MinHeight=200;FCKeditor.MinWidth=750;FCKeditor.prototype.Version='2.6.6';FCKeditor.prototype.VersionBuild='25427';FCKeditor.prototype.Create=function()
{document.write(this.CreateHtml());}
FCKeditor.prototype.CreateHtml=function()
{if(!this.InstanceName||this.InstanceName.length==0)
{this._ThrowError(701,'You must specify an instance name.');return'';}
var sHtml='';if(!this.CheckBrowser||this._IsCompatibleBrowser())
{sHtml+='<input type="hidden" id="'+this.InstanceName+'" name="'+this.InstanceName+'" value="'+this._HTMLEncode(this.Value)+'" style="display:none" />';sHtml+=this._GetConfigHtml();sHtml+=this._GetIFrameHtml();}
else
{var sWidth=this.Width.toString().indexOf('%')>0?this.Width:this.Width+'px';var sHeight=this.Height.toString().indexOf('%')>0?this.Height:this.Height+'px';sHtml+='<textarea name="'+this.InstanceName+'" rows="4" cols="40" style="width:'+sWidth+';height:'+sHeight;if(this.TabIndex)
sHtml+='" tabindex="'+this.TabIndex;sHtml+='">'+
this._HTMLEncode(this.Value)+'<\/textarea>';}
return sHtml;}
FCKeditor.prototype.ReplaceTextarea=function()
{if(document.getElementById(this.InstanceName+'___Frame'))
return;if(!this.CheckBrowser||this._IsCompatibleBrowser())
{var oTextarea=document.getElementById(this.InstanceName);var colElementsByName=document.getElementsByName(this.InstanceName);var i=0;while(oTextarea||i==0)
{if(oTextarea&&oTextarea.tagName.toLowerCase()=='textarea')
break;oTextarea=colElementsByName[i++];}
if(!oTextarea)
{alert('Error: The TEXTAREA with id or name set to "'+this.InstanceName+'" was not found');return;}
oTextarea.style.display='none';if(oTextarea.tabIndex)
this.TabIndex=oTextarea.tabIndex;this._InsertHtmlBefore(this._GetConfigHtml(),oTextarea);this._InsertHtmlBefore(this._GetIFrameHtml(),oTextarea);}}
FCKeditor.prototype._InsertHtmlBefore=function(html,element)
{if(element.insertAdjacentHTML)
element.insertAdjacentHTML('beforeBegin',html);else
{var oRange=document.createRange();oRange.setStartBefore(element);var oFragment=oRange.createContextualFragment(html);element.parentNode.insertBefore(oFragment,element);}}
FCKeditor.prototype._GetConfigHtml=function()
{var sConfig='';for(var o in this.Config)
{if(sConfig.length>0)sConfig+='&amp;';sConfig+=encodeURIComponent(o)+'='+encodeURIComponent(this.Config[o]);}
return'<input type="hidden" id="'+this.InstanceName+'___Config" value="'+sConfig+'" style="display:none" />';}
FCKeditor.prototype._GetIFrameHtml=function()
{var sFile='fckeditor.html';try
{if((/fcksource=true/i).test(window.top.location.search))
sFile='fckeditor.original.html';}
catch(e){}
var sLink=this.BasePath+'editor/'+sFile+'?InstanceName='+encodeURIComponent(this.InstanceName);if(this.ToolbarSet)
sLink+='&amp;Toolbar='+this.ToolbarSet;var html='<iframe id="'+this.InstanceName+'___Frame" src="'+sLink+'" width="'+this.Width+'" height="'+this.Height;if(this.TabIndex)
html+='" tabindex="'+this.TabIndex;html+='" frameborder="0" scrolling="no"></iframe>';return html;}
FCKeditor.prototype._IsCompatibleBrowser=function()
{return FCKeditor_IsCompatibleBrowser();}
FCKeditor.prototype._ThrowError=function(errorNumber,errorDescription)
{this.ErrorNumber=errorNumber;this.ErrorDescription=errorDescription;if(this.DisplayErrors)
{document.write('<div style="COLOR: #ff0000">');document.write('[ FCKeditor Error '+this.ErrorNumber+': '+this.ErrorDescription+' ]');document.write('</div>');}
if(typeof(this.OnError)=='function')
this.OnError(this,errorNumber,errorDescription);}
FCKeditor.prototype._HTMLEncode=function(text)
{if(typeof(text)!="string")
text=text.toString();text=text.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return text;};(function()
{var textareaToEditor=function(textarea)
{var editor=new FCKeditor(textarea.name);editor.Width=Math.max(textarea.offsetWidth,FCKeditor.MinWidth);editor.Height=Math.max(textarea.offsetHeight,FCKeditor.MinHeight);return editor;}
FCKeditor.ReplaceAllTextareas=function()
{var textareas=document.getElementsByTagName('textarea');for(var i=0;i<textareas.length;i++)
{var editor=null;var textarea=textareas[i];var name=textarea.name;if(!name||name.length==0)
continue;if(typeof arguments[0]=='string')
{var classRegex=new RegExp('(?:^| )'+arguments[0]+'(?:$| )');if(!classRegex.test(textarea.className))
continue;}
else if(typeof arguments[0]=='function')
{editor=textareaToEditor(textarea);if(arguments[0](textarea,editor)===false)
continue;}
if(!editor)
editor=textareaToEditor(textarea);editor.ReplaceTextarea();}}})();function FCKeditor_IsCompatibleBrowser()
{var sAgent=navigator.userAgent.toLowerCase();if(/*@cc_on!@*/false&&sAgent.indexOf("mac")==-1)
{var sBrowserVersion=navigator.appVersion.match(/MSIE (.\..)/)[1];return(sBrowserVersion>=5.5);}
if(navigator.product=="Gecko"&&navigator.productSub>=20030210&&!(typeof(opera)=='object'&&opera.postError))
return true;if(window.opera&&window.opera.version&&parseFloat(window.opera.version())>=9.5)
return true;if(sAgent.indexOf(' adobeair/')!=-1)
return(sAgent.match(/ adobeair\/(\d+)/)[1]>=1);if(sAgent.indexOf(' applewebkit/')!=-1)
return(sAgent.match(/ applewebkit\/(\d+)/)[1]>=522);return false;}
