var ver='2.32';var ie6=$.browser.msie&&/MSIE 6.0/.test(navigator.userAgent);function log(){if(window.console&&window.console.log)window.console.log('[cycle] '+Array.prototype.join.call(arguments,''))};$.fn.cycle=function(options){if(this.length==0){log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this}var opt2=arguments[1];return this.each(function(){if(options===undefined||options===null)options={};if(options.constructor==String){switch(options){case'stop':if(this.cycleTimeout)clearTimeout(this.cycleTimeout);this.cycleTimeout=0;$(this).data('cycle.opts','');return;case'pause':this.cyclePause=1;return;case'resume':this.cyclePause=0;if(opt2===true){options=$(this).data('cycle.opts');if(!options){log('options not found, can not resume');return}if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0}go(options.elements,options,1,1)}return;default:options={fx:options}}}else if(options.constructor==Number){var num=options;options=$(this).data('cycle.opts');if(!options){log('options not found, can not advance slide');return}if(num<0||num>=options.elements.length){log('invalid slide index: '+num);return}options.nextSlide=num;if(this.cycleTimeout){clearTimeout(this.cycleTimeout);this.cycleTimeout=0}go(options.elements,options,1,num>=options.currSlide);return}if(this.cycleTimeout)clearTimeout(this.cycleTimeout);this.cycleTimeout=0;this.cyclePause=0;var $cont=$(this);var $slides=options.slideExpr?$(options.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log('terminating; too few slides: '+els.length);return}var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop)opts.countdown=opts.autostopCount||els.length;$cont.data('cycle.opts',opts);opts.container=this;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0});if(opts.continuous)opts.after.push(function(){go(els,opts,0,!opts.rev)});if(ie6&&opts.cleartype&&!opts.cleartypeNoBg)clearTypeFix($slides);var cls=this.className;opts.width=parseInt((cls.match(/w:(\d+)/)||[])[1])||opts.width;opts.height=parseInt((cls.match(/h:(\d+)/)||[])[1])||opts.height;opts.timeout=parseInt((cls.match(/t:(\d+)/)||[])[1])||opts.timeout;if($cont.css('position')=='static')$cont.css('position','relative');if(opts.width)$cont.width(opts.width);if(opts.height&&opts.height!='auto')$cont.height(opts.height);if(opts.startingSlide)opts.startingSlide=parseInt(opts.startingSlide);if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++)opts.randomMap.push(i);opts.randomMap.sort(function(a,b){return Math.random()-0.5});opts.randomIndex=0;opts.startingSlide=opts.randomMap[0]}else if(opts.startingSlide>=els.length)opts.startingSlide=0;var first=opts.startingSlide||0;$slides.css({position:'absolute',top:0,left:0}).hide().each(function(i){var z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css('z-index',z)});$(els[first]).css('opacity',1).show();if($.browser.msie)els[first].style.removeAttribute('filter');if(opts.fit&&opts.width)$slides.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')$slides.height(opts.height);if(opts.containerResize){var maxw=0,maxh=0;for(var i=0;i<els.length;i++){var $e=$(els[i]),w=$e.outerWidth(),h=$e.outerHeight();maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh}$cont.css({width:maxw+'px',height:maxh+'px'})}if(opts.pause)$cont.hover(function(){this.cyclePause++},function(){this.cyclePause--});var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init))init($cont,$slides,opts);else if(opts.fx!='custom')log('unknown transition: '+opts.fx);$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:$el.height();this.cycleW=(opts.fit&&opts.width)?opts.width:$el.width()});opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(':eq('+first+')').css(opts.cssBefore);if(opts.cssFirst)$($slides[first]).css(opts.cssFirst);if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String)opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);if(!opts.sync)opts.speed=opts.speed/2;while((opts.timeout-opts.speed)<250)opts.timeout+=opts.speed}if(opts.easing)opts.easeIn=opts.easeOut=opts.easing;if(!opts.speedIn)opts.speedIn=opts.speed;if(!opts.speedOut)opts.speedOut=opts.speed;opts.slideCount=els.length;opts.currSlide=first;if(opts.random){opts.nextSlide=opts.currSlide;if(++opts.randomIndex==els.length)opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex]}else opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;var e0=$slides[first];if(opts.before.length)opts.before[0].apply(e0,[e0,e0,opts,true]);if(opts.after.length>1)opts.after[1].apply(e0,[e0,e0,opts,true]);if(opts.click&&!opts.next)opts.next=opts.click;if(opts.next)$(opts.next).bind('click',function(){return advance(els,opts,opts.rev?-1:1)});if(opts.prev)$(opts.prev).bind('click',function(){return advance(els,opts,opts.rev?1:-1)});if(opts.pager)buildPager(els,opts);opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount)opts.countdown++;els[prepend?'unshift':'push'](s);if(opts.els)opts.els[prepend?'unshift':'push'](s);opts.slideCount=els.length;$s.css('position','absolute');$s[prepend?'prependTo':'appendTo']($cont);if(prepend){opts.currSlide++;opts.nextSlide++}if(ie6&&opts.cleartype&&!opts.cleartypeNoBg)clearTypeFix($s);if(opts.fit&&opts.width)$s.width(opts.width);if(opts.fit&&opts.height&&opts.height!='auto')$slides.height(opts.height);s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager)$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);if(typeof opts.onAddSlide=='function')opts.onAddSlide($s)};if(opts.timeout||opts.continuous)this.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},opts.continuous?10:opts.timeout+(opts.delay||0))})};function go(els,opts,manual,fwd){if(opts.busy)return;var p=opts.container,curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleTimeout===0&&!manual)return;if(!manual&&!p.cyclePause&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end)opts.end(opts);return}if(manual||!p.cyclePause){if(opts.before.length)$.each(opts.before,function(i,o){o.apply(next,[curr,next,opts,fwd])});var after=function(){if($.browser.msie&&opts.cleartype)this.style.removeAttribute('filter');$.each(opts.after,function(i,o){o.apply(next,[curr,next,opts,fwd])})};if(opts.nextSlide!=opts.currSlide){opts.busy=1;if(opts.fxFn)opts.fxFn(curr,next,opts,after,fwd);else if($.isFunction($.fn.cycle[opts.fx]))$.fn.cycle[opts.fx](curr,next,opts,after);else $.fn.cycle.custom(curr,next,opts,after,manual&&opts.fastOnEvent)}if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length)opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex]}else{var roll=(opts.nextSlide+1)==els.length;opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1}if(opts.pager)$.fn.cycle.updateActivePagerLink(opts.pager,opts.currSlide)}if(opts.timeout&&!opts.continuous)p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},getTimeout(curr,next,opts,fwd));else if(opts.continuous&&p.cyclePause)p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev)},10)};$.fn.cycle.updateActivePagerLink=function(pager,currSlide){$(pager).find('a').removeClass('activeSlide').filter('a:eq('+currSlide+')').addClass('activeSlide')};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn(curr,next,opts,fwd);if(t!==false)return t}return opts.timeout};function advance(els,opts,val){var p=opts.container,timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2)opts.randomIndex=els.length-2;else if(opts.randomIndex==-1)opts.randomIndex=els.length-1;opts.nextSlide=opts.randomMap[opts.randomIndex]}else if(opts.random){if(++opts.randomIndex==els.length)opts.randomIndex=0;opts.nextSlide=opts.randomMap[opts.randomIndex]}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap)return false;opts.nextSlide=els.length-1}else if(opts.nextSlide>=els.length){if(opts.nowrap)return false;opts.nextSlide=0}}if(opts.prevNextClick&&typeof opts.prevNextClick=='function')opts.prevNextClick(val>0,opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,val>=0);return false};function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts)});$.fn.cycle.updateActivePagerLink(opts.pager,opts.startingSlide)};$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a=(typeof opts.pagerAnchorBuilder=='function')?opts.pagerAnchorBuilder(i,el):'<a href="#">'+(i+1)+'</a>';if(!a)return;var $a=$(a);if($a.parents('body').length==0)$a.appendTo($p);$a.bind(opts.pagerEvent,function(){opts.nextSlide=i;var p=opts.container,timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0}if(typeof opts.pagerClick=='function')opts.pagerClick(opts.nextSlide,els[opts.nextSlide]);go(els,opts,1,opts.currSlide<i);return false});if(opts.pauseOnPagerHover)$a.hover(function(){opts.container.cyclePause++},function(){opts.container.cyclePause--})};function clearTypeFix($slides){function hex(s){var s=parseInt(s).toString(16);return s.length<2?'0'+s:s};function getBg(e){for(;e&&e.nodeName.toLowerCase()!='html';e=e.parentNode){var v=$.css(e,'background-color');if(v.indexOf('rgb')>=0){var rgb=v.match(/\d+/g);return'#'+hex(rgb[0])+hex(rgb[1])+hex(rgb[2])}if(v&&v!='transparent')return v}return'#ffffff'};$slides.each(function(){$(this).css('background-color',getBg(this))})};$.fn.cycle.custom=function(curr,next,opts,cb,immediate){var $l=$(curr),$n=$(next);$n.css(opts.cssBefore);var speedIn=immediate?1:opts.speedIn;var speedOut=immediate?1:opts.speedOut;var easeIn=immediate?null:opts.easeIn;var easeOut=immediate?null:opts.easeOut;var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb)};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter)$l.css(opts.cssAfter);if(!opts.sync)fn()});if(opts.sync)fn()};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(':eq('+opts.startingSlide+')').css('opacity',0);opts.before.push(function(){$(this).show()});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={opacity:0};opts.cssAfter={display:'none'};opts.onAddSlide=function($s){$s.hide()}}};$.fn.cycle.ver=function(){return ver};$.fn.cycle.defaults={fx:'fade',timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,pager:null,pagerClick:null,pagerEvent:'click',pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:'auto',startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:0,nowrap:0,fastOnEvent:0};

var i=function(e){if(!e)var e=window.event;e.cancelBubble=true;if(e.stopPropagation)e.stopPropagation()};$.fn.checkbox=function(f){try{document.execCommand('BackgroundImageCache',false,true)}catch(e){}var g={cls:'jquery-checkbox',empty:'spacer.gif'};g=$.extend(g,f||{});var h=function(a){var b=a.checked;var c=a.disabled;var d=$(a);if(a.stateInterval)clearInterval(a.stateInterval);a.stateInterval=setInterval(function(){if(a.disabled!=c)d.trigger((c=!!a.disabled)?'disable':'enable');if(a.checked!=b)d.trigger((b=!!a.checked)?'check':'uncheck')},10);return d};return this.each(function(){var a=this;var b=h(a);if(a.wrapper)a.wrapper.remove();a.wrapper=$('<span class="'+g.cls+'"><span class="mark"><img src="'+homeurl+'images/'+g.empty+'" /></span></span>');a.wrapperInner=a.wrapper.children('span:eq(0)');a.wrapper.hover(function(e){a.wrapperInner.addClass(g.cls+'-hover');i(e)},function(e){a.wrapperInner.removeClass(g.cls+'-hover');i(e)});b.css({position:'absolute',zIndex:-1,visibility:'hidden'}).after(a.wrapper);var c=false;if(b.attr('id')){c=$('label[for='+b.attr('id')+']');if(!c.length)c=false}if(!c){c=b.closest?b.closest('label'):b.parents('label:eq(0)');if(!c.length)c=false}if(c){c.hover(function(e){a.wrapper.trigger('mouseover',[e])},function(e){a.wrapper.trigger('mouseout',[e])});c.click(function(e){b.trigger('click',[e]);i(e);return false})}a.wrapper.click(function(e){b.trigger('click',[e]);i(e);return false});b.click(function(e){i(e)});b.bind('disable',function(){a.wrapperInner.addClass(g.cls+'-disabled')}).bind('enable',function(){a.wrapperInner.removeClass(g.cls+'-disabled')});b.bind('check',function(){a.wrapper.addClass(g.cls+'-checked')}).bind('uncheck',function(){a.wrapper.removeClass(g.cls+'-checked')});$('img',a.wrapper).bind('dragstart',function(){return false}).bind('mousedown',function(){return false});if(window.getSelection)a.wrapper.css('MozUserSelect','none');if(a.checked)a.wrapper.addClass(g.cls+'-checked');if(a.disabled)a.wrapperInner.addClass(g.cls+'-disabled')})}; var defaultOptions = {preloadImg:true}; var utTransformImgPreloaded = false; var utTransformPreloadHoverFocusImg = function(strImgUrl) { strImgUrl = strImgUrl.replace(/^url\((.*)\)/,'$1').replace(/^\"(.*)\"$/,'$1'); var imgHover = new Image(); imgHover.src = strImgUrl.replace(/\.([a-zA-Z]*)$/,'-hover.$1'); var imgFocus = new Image(); imgFocus.src = strImgUrl.replace(/\.([a-zA-Z]*)$/,'-focus.$1');}; var utTransformGetLabel = function(objfield){ var selfForm = $(objfield.get(0).form); var oLabel = objfield.next(); if(!oLabel.is('label')) { oLabel = objfield.prev(); if(oLabel.is('label')){ var inputname = objfield.attr('id'); if(inputname){ oLabel = selfForm.find('label[for="'+inputname+'"]');}
}
}
if(oLabel.is('label')){return oLabel.css('cursor','pointer');}
return false;}; var utTransformHideSelect = function(oTarget){ var ulVisible = $('.uttsw ul:visible'); ulVisible.each(function(){ var oSelect = $(this).parents(".uttsw:first").find("select").get(0); if( !(oTarget && oSelect.oLabel && oSelect.oLabel.get(0) == oTarget.get(0)) ){$(this).hide();}
});}; var utTransformCheckExternalClick = function(event) { if ($(event.target).parents('.uttsw').length === 0) { utTransformHideSelect($(event.target));}
}; var utTransformAddDocumentListener = function (){ $(document).mousedown(utTransformCheckExternalClick);}; var utTransformReset = function(f){ var sel; $('.uttsw select', f).each(function(){sel = (this.selectedIndex<0) ? 0 : this.selectedIndex; $('ul', $(this).parent()).each(function(){$('a:eq('+ sel +')', this).click();});});}; $.fn.jqTransInputButton = function(){ return this.each(function(){ var newBtn = $('<button id="'+ this.id +'" name="'+ this.name +'" type="'+ this.type +'" class="'+ this.className +' uttb" '+ $(this).attr('onclick') +'><span class="uttbl"><span class="uttbm"><span class="uttbr">'+ $(this).attr('value') +'</span></span></span>')
.hover(function(){newBtn.addClass('uttb_hover');},function(){newBtn.removeClass('uttb_hover')})
.mousedown(function(){newBtn.addClass('uttb_click')})
.mouseup(function(){newBtn.removeClass('uttb_click')})
if($.browser.mozilla){newBtn.addClass('uttb_foxy');}
$(newBtn).click($(this)[0].onclick); $(this).replaceWith(newBtn);});}; $.fn.jqTransInputText = function(){ return this.each(function(){ var $input = $(this); if($input.hasClass('jqtranformdone') || !$input.is('input')) {return;}
$input.addClass('jqtranformdone'); var oLabel = utTransformGetLabel($(this)); oLabel && oLabel.bind('click',function(){$input.focus();}); var inputSize=$input.width(); if($input.attr('size')){ inputSize = $input.attr('size')*10; $input.css('width',inputSize);}
$input.addClass("utTransformInput").wrap('<div class="uttiw"><div class="uttii"><div></div></div></div>'); var $wrapper = $input.parent().parent().parent(); $wrapper.css("width", inputSize+10); $input
.focus(function(){$wrapper.addClass("uttiw_focus");})
.blur(function(){$wrapper.removeClass("uttiw_focus");})
.hover(function(){$wrapper.addClass("uttiw_hover");},function(){$wrapper.removeClass("uttiw_hover");})
; $.browser.safari && $wrapper.addClass('utts'); $.browser.safari && $input.css('width',$wrapper.width()+16); this.wrapper = $wrapper;});}; $.fn.jqTransTextarea = function(){ return this.each(function(){ var textarea = $(this); if(textarea.hasClass('utTransformdone')) {return;}
textarea.addClass('utTransformdone'); oLabel = utTransformGetLabel(textarea); oLabel && oLabel.click(function(){textarea.focus();}); var strTable = '<table cellspacing="0" cellpadding="0" width="100%" border="0" class="uttt">'; strTable +='<tr><td id="uttt-tl" width="12" height="12"></td><td id="uttt-tm"></td><td id="uttt-tr" width="12" height="12"></td></tr>'; strTable +='<tr><td id="uttt-ml" width="12" height="12">&nbsp;</td><td id="uttt-mm"><div></div></td><td id="uttt-mr" width="12" height="12">&nbsp;</td></tr>'; strTable +='<tr><td id="uttt-bl" width="12" height="12"></td><td id="uttt-bm"></td><td id="uttt-br" width="12" height="12"></td></tr>'; strTable +='</table>'; var oTable = $(strTable)
.insertAfter(textarea)
.hover(function(){ !oTable.hasClass('uttt-focus') && oTable.addClass('uttt-hover');},function(){ oTable.removeClass('uttt-hover');})
; textarea
.focus(function(){oTable.removeClass('uttt-hover').addClass('uttt-focus');})
.blur(function(){oTable.removeClass('uttt-focus');})
.appendTo($('#uttt-mm div',oTable))
; this.oTable = oTable; if($.browser.safari){ $('#uttt-mm',oTable)
.addClass('uttst')
.find('div')
.css('height',textarea.height())
.css('width',textarea.width())
;}
});}; $.fn.jqTransSelect = function(){ return this.each(function(index){ var $select = $(this); if($select.hasClass('utth')) {return;}
if($select.attr('multiple')) {return;}
var oLabel = utTransformGetLabel($select); var $wrapper = $select
.addClass('utth')
.wrap('<div class="uttsw"></div>')
.parent()
.css({zIndex: 10-index})
; $wrapper.prepend('<div><span></span><a href="#" class="uttso"></a></div><ul></ul>'); var $ul = $('ul', $wrapper).css('width',$select.width()).hide(); $('option', this).each(function(i){ var oLi = $('<li><a href="#" index="'+ i +'">'+ $(this).html() +'</a></li>'); $ul.append(oLi);}); $ul.find('a').click(function(){ $('a.selected', $wrapper).removeClass('selected'); $(this).addClass('selected'); if ($select[0].selectedIndex != $(this).attr('index') && $select[0].onchange) { $select[0].selectedIndex = $(this).attr('index'); $select[0].onchange();}
$select[0].selectedIndex = $(this).attr('index'); $('span:eq(0)', $wrapper).html($(this).html()); $ul.hide(); return false;}); $('a:eq('+ this.selectedIndex +')', $ul).click(); $('span:first', $wrapper).click(function(){$("a.uttso",$wrapper).trigger('click');}); oLabel && oLabel.click(function(){$("a.uttso",$wrapper).trigger('click');}); this.oLabel = oLabel; var oLinkOpen = $('a.uttso', $wrapper)
.click(function(){ if( $ul.css('display') == 'none' ) {utTransformHideSelect();}
if($select.attr('disabled')){return false;}
$ul.slideToggle('fast', function(){ var offSet = ($('a.selected', $ul).offset().top - $ul.offset().top); $ul.animate({scrollTop: offSet});}); return false;})
; var iSelectWidth = $select.outerWidth(); var oSpan = $('span:first',$wrapper); var newWidth = (iSelectWidth > oSpan.innerWidth())?iSelectWidth+oLinkOpen.outerWidth():$wrapper.width(); $wrapper.css('width',newWidth); $ul.css('width',newWidth-2); oSpan.css({width:iSelectWidth}); $ul.css({display:'block',visibility:'hidden'}); var iSelectHeight = ($('li',$ul).length)*($('li:first',$ul).height()); (iSelectHeight < $ul.height()) && $ul.css({height:iSelectHeight,'overflow':'hidden'}); $ul.css({display:'none',visibility:'visible'});});}; $.fn.utTransform = function(options){ var opt = $.extend({},defaultOptions,options); return this.each(function(){ var selfForm = $(this); if(selfForm.hasClass('utTransformdone')) {return;}
selfForm.addClass('utTransformdone'); $('input:submit, input:reset, input:button, button', this).jqTransInputButton(); $('input:text, input:password', this).jqTransInputText(); $('textarea', this).jqTransTextarea(); if( $('select', this).jqTransSelect().length > 0 ){utTransformAddDocumentListener();}
selfForm.bind('reset',function(){var action = function(){utTransformReset(this);}; window.setTimeout(action, 10);});});}; $.fn.filestyle = function(options) { var settings = { width : 250
}; if(options) { $.extend(settings, options);}; return this.each(function() { var self = this; var wrapper = $('<div class="fileinput">'); var btnwrapper = $('<div class="filebtn">'); var filename = $('<input class="file">')
.addClass($(self).attr("class"))
.css({ "width": settings.width + "px"
}); $(self).wrap(wrapper)
.hover(function(){$('.filebtn').addClass('filehover');},function(){$('.filebtn').removeClass('filehover')})
; $(self).before(filename); $(self).wrap(btnwrapper); $(self).css({ "position": "absolute", "height": settings.imageheight + "px", "width": settings.width + "px", "cursor": "pointer", "opacity": "0.0"
}); $(self).css("margin-left", settings.imagewidth - settings.width + "px"); $(self).bind("change", function() { filename.val($(self).val());});});}; $('input[type="file"]').filestyle({ imageheight : 19, imagewidth : 52, width : 220
}); 

$.fn.lavaLamp=function(o){o=$.extend({target:'li',fx:'swing',speed:500,click:function(){return true},startItem:'',autoReturn:true,returnDelay:0,setOnClick:true,homeTop:0,homeLeft:0,homeWidth:0,homeHeight:0,returnHome:false,autoResize:false},o||{});_uHighlightA('#uMenuDiv1',document.location.href+'/','selectedLava');function getInt(arg){var myint=parseInt(arg);return(isNaN(myint)?0:myint);}
if(o.autoResize)
$(window).resize(function(){$(o.target+'.selectedLava').trigger('mouseenter');});return this.each(function(){if($(this).css('position')=='static')
$(this).css('position','relative');if(o.homeTop||o.homeLeft){var $home=$('<'+o.target+' class="homeLava"></'+o.target+'>').css({left:o.homeLeft,top:o.homeTop,width:o.homeWidth,height:o.homeHeight,position:'absolute'});$(this).prepend($home);}
var path=location.pathname+location.search+location.hash,$selected,$back,$lt=$(o.target+'[class!=noLava]',this),delayTimer,bx=0,by=0;$selected=$(o.target+'.selectedLava',this);if(o.startItem!='')
$selected=$lt.eq(o.startItem);if((o.homeTop||o.homeLeft)&&$selected.length<1)
$selected=$home;if($selected.length<1){var pathmatch_len=0,$pathel;$lt.each(function(){var thishref=$('a:first',this).attr('href');if(path.indexOf(thishref)>-1&&thishref.length>pathmatch_len)
{$pathel=$(this);pathmatch_len=thishref.length;}});if(pathmatch_len>0){$selected=$pathel;}}
if($selected.length<1)
$selected=$lt.eq(0);$selected=$($selected.eq(0).addClass('selectedLava'));$lt.bind('mouseenter',function(){if(delayTimer){clearTimeout(delayTimer);delayTimer=null;}
move($(this));}).click(function(e){if(o.setOnClick){$selected.removeClass('selectedLava');$selected=$(this).addClass('selectedLava');}
return o.click.apply(this,[e,this]);});$back=$('<li class="backLava"><div class="leftLava"></div><div class="bottomLava"></div><div class="cornerLava"></div></li>').css('position','absolute').prependTo(this);bx=getInt($back.css('borderLeftWidth'))+getInt($back.css('borderRightWidth'))+getInt($back.css('paddingLeft'))+getInt($back.css('paddingRight'));by=getInt($back.css('borderTopWidth'))+getInt($back.css('borderBottomWidth'))+getInt($back.css('paddingTop'))+getInt($back.css('paddingBottom'));if(o.homeTop||o.homeLeft)
$back.css({left:o.homeLeft,top:o.homeTop,width:o.homeWidth,height:o.homeHeight});else
{$back.css({left:$selected.position().left,top:$selected.position().top,width:$selected.outerWidth()-bx,height:$selected.outerHeight()-by});}
$(this).bind('mouseleave',function(){var $returnEl=null;if(o.returnHome)
$returnEl=$home;else if(!o.autoReturn)
return true;if(o.returnDelay){if(delayTimer)clearTimeout(delayTimer);delayTimer=setTimeout(function(){move($returnEl);},o.returnDelay);}
else{move($returnEl);}
return true;});function move($el){if(!$el)$el=$selected;$back.stop().animate({left:$el.position().left,top:$el.position().top,width:$el.outerWidth()-bx,height:$el.outerHeight()-by},o.speed,o.fx);};});};
$(document).ready(function() {
 Cufon.replace('.blogname h1 a',{color:'-linear-gradient(#444, 0.5=#fff, #444)',textShadow:'#252525 1px 1px',fontSize:'56px'});
 $('input:checkbox').checkbox({cls:'checkbox'});
 $('input:radio').checkbox({cls:'radio'});
 $('#casing form,#forum-casing form').utTransform();
 $(".sidebox ul li a,.sidebox .catsTable a").hover(function(){$(this).animate({paddingLeft: 25},150);},function(){$(this).animate({paddingLeft:10},150);});
 $('#bottom-layer').cycle({fx:'fade',speed:2000,timeout:100});
 $('#menu ul').lavaLamp({target:'a',autoSize:true});
});
