
(function($){$.fn.autoResize=function(options){var settings=$.extend({onResize:function(){},animate:true,animateDuration:150,animateCallback:function(){},extraSpace:20,limit:1000},options);this.filter('textarea').each(function(){var textarea=$(this).css({resize:'none','overflow-y':'hidden'}),origHeight=textarea.height(),clone=(function(){var props=['height','width','lineHeight','textDecoration','letterSpacing'],propOb={};$.each(props,function(i,prop){propOb[prop]=textarea.css(prop);});return textarea.clone().removeAttr('id').removeAttr('name').css({position:'absolute',top:0,left:-9999}).css(propOb).attr('tabIndex','-1').insertBefore(textarea);})(),lastScrollTop=null,updateSize=function(){clone.height(0).val($(this).val()).scrollTop(10000);var scrollTop=Math.max(clone.scrollTop(),origHeight)+settings.extraSpace,toChange=$(this).add(clone);if(lastScrollTop===scrollTop){return;}
lastScrollTop=scrollTop;if(scrollTop>=settings.limit){$(this).css('overflow-y','');return;}
settings.onResize.call(this);settings.animate&&textarea.css('display')==='block'?toChange.stop().animate({height:scrollTop},settings.animateDuration,settings.animateCallback):toChange.height(scrollTop);};textarea.unbind('.dynSiz').bind('keyup.dynSiz',updateSize).bind('keydown.dynSiz',updateSize).bind('change.dynSiz',updateSize);});return this;};})(jQuery);(function($){$.fn.ticker=function(options){var opts=$.extend({},$.fn.ticker.defaults,options);var newsID='#'+$(this).attr('id');var tagType=$(this).attr('tagName');return this.each(function(){var settings={position:0,time:0,distance:0,newsArr:{},play:true,paused:false,contentLoaded:false};if(tagType!='UL'&&opts.htmlFeed===true){debugError('Cannot use <'+tagType.toLowerCase()+'> type of element for this plugin - must of type <ul>');return false;}
initialisePage();function countSize(obj){var size=0,key;for(key in obj){if(obj.hasOwnProperty(key))size++;}
return size;};function debugError(obj){if(opts.debugMode){if(window.console&&window.console.log){window.console.log(obj);}
else{alert(obj);}}}
function initialisePage(){$(opts.dom.wrapperID).append('<div id="'+opts.dom.tickerID.replace('#','')+'"><div id="'+opts.dom.titleID.replace('#','')+'"><span style="display: none;"><!-- --></span></div><p id="'+opts.dom.contentID.replace('#','')+'"></p><div id="'+opts.dom.revealID.replace('#','')+'"><span style="display: none;"><!-- --></span></div></div>');$(opts.dom.wrapperID).removeClass('no-js').addClass('has-js');$(opts.dom.tickerElem+','+opts.dom.titleElem+','+opts.dom.contentID).hide();if(opts.controls){$(opts.dom.controlsID).live('click mouseover mousedown mouseout mouseup',function(e){var button=e.target.id;if(e.type=='click'){switch(button){case opts.dom.prevID.replace('#',''):settings.paused=true;$(opts.dom.playPauseID).addClass('paused');changeContent(button);break;case opts.dom.nextID.replace('#',''):settings.paused=true;$(opts.dom.playPauseID).addClass('paused');changeContent(button);break;case opts.dom.playPauseID.replace('#',''):if(settings.play==true){settings.paused=true;$(opts.dom.playPauseID).addClass('paused');pauseTicker();}
else{settings.paused=false;$(opts.dom.playPauseID).removeClass('paused');restartTicker();}
break;}}
else if(e.type=='mouseover'&&$('#'+button).hasClass('controls')){$('#'+button).addClass('over');}
else if(e.type=='mousedown'&&$('#'+button).hasClass('controls')){$('#'+button).addClass('down');}
else if(e.type=='mouseup'&&$('#'+button).hasClass('controls')){$('#'+button).removeClass('down');}
else if(e.type=='mouseout'&&$('#'+button).hasClass('controls')){$('#'+button).removeClass('over');}});$(opts.dom.wrapperID).append('<ul id="'+opts.dom.controlsID.replace('#','')+'"><li id="'+opts.dom.playPauseID.replace('#','')+'" class="controls"></li><li id="'+opts.dom.prevID.replace('#','')+'" class="controls"></li><li id="'+opts.dom.nextID.replace('#','')+'" class="controls"></li></ul>');}
$(opts.dom.contentID).mouseover(function(){if(settings.paused==false){pauseTicker();}}).mouseout(function(){if(settings.paused==false){restartTicker();}});updateTicker();}
function updateTicker(){if(settings.contentLoaded==false){if(opts.ajaxFeed){debugError('Code Me!');}
else if(opts.htmlFeed){if($(newsID+' LI').length>0){$(newsID+' LI').each(function(i){settings.newsArr['item-'+i]={type:opts.dom.titleText,content:$(this).html()};});}
else{debugError('Couldn\'t find any content for the ticker to use!');return false;}}
else{debugError('Couldn\'t find any content for the ticker to use!');return false;}
settings.contentLoaded=true;}
$(opts.dom.titleElem).html(settings.newsArr['item-'+settings.position].type);$(opts.dom.contentID).html(settings.newsArr['item-'+settings.position].content);if(settings.position==(countSize(settings.newsArr)-1)){settings.position=0;}
else{settings.position++;}
distance=$(opts.dom.contentID).width();time=distance/opts.speed;$(opts.dom.wrapperID).find(opts.dom.titleID).fadeIn().end().find(opts.dom.titleElem).fadeIn('slow',revealContent);}
function revealContent(){if(settings.play){var offset=$(opts.dom.titleElem).width()+20;$(opts.dom.revealID).css('left',offset+'px');$(opts.dom.revealElem).show(0,function(){$(opts.dom.contentID).css('left',offset+'px').show();$(opts.dom.revealID).css('margin-left','0px').delay(20).animate({marginLeft:distance+'px'},time,'linear',postReveal);});}
else{return false;}};function postReveal(){if(settings.play){$(opts.dom.contentID).delay(opts.pauseOnItems).fadeOut('slow');$(opts.dom.revealID).hide(0,function(){$(opts.dom.tickerID).delay(opts.pauseOnItems).fadeOut(opts.fadeOutSpeed,function(){$(opts.dom.wrapperID).find(opts.dom.titleElem+','+opts.dom.revealElem+','+opts.dom.contentID).hide().end().find(opts.dom.tickerID+','+opts.dom.revealID+','+opts.dom.titleID).show().end().find(opts.dom.tickerID+','+opts.dom.revealID+','+opts.dom.titleID).removeAttr('style');updateTicker();});});}
else{$(opts.dom.revealElem).hide();}}
function pauseTicker(){settings.play=false;$(opts.dom.tickerID+','+opts.dom.revealID+','+opts.dom.titleID+','+opts.dom.titleElem+','+opts.dom.revealElem+','+opts.dom.contentID).stop(true,true);$(opts.dom.revealID+','+opts.dom.revealElem).hide();$(opts.dom.wrapperID).find(opts.dom.titleID+','+opts.dom.titleElem).show().end().find(opts.dom.contentID).show();}
function restartTicker(){settings.play=true;settings.paused=false;postReveal();}
function changeContent(direction){pauseTicker();switch(direction){case'prev':if(settings.position==0){settings.position=countSize(settings.newsArr)-2;}
else if(settings.position==1){settings.position=countSize(settings.newsArr)-1;}
else{settings.position=settings.position-2;}
$(opts.dom.titleElem).html(settings.newsArr['item-'+settings.position].type);$(opts.dom.contentID).html(settings.newsArr['item-'+settings.position].content);break;case'next':$(opts.dom.titleElem).html(settings.newsArr['item-'+settings.position].type);$(opts.dom.contentID).html(settings.newsArr['item-'+settings.position].content);break;}
if(settings.position==(countSize(settings.newsArr)-1)){settings.position=0;}
else{settings.position++;}}});};$.fn.ticker.defaults={speed:0.10,ajaxFeed:false,htmlFeed:true,debugMode:true,controls:true,dom:{contentID:'#ticker-content',titleID:'#ticker-title',titleElem:'#ticker-title SPAN',titleText:'INFORMASI',tickerID:'#ticker',wrapperID:'#ticker-wrapper',revealID:'#ticker-swipe',revealElem:'#ticker-swipe SPAN',controlsID:'#ticker-controls',prevID:'#prev',nextID:'#next',playPauseID:'#play-pause'},pauseOnItems:2000,fadeInSpeed:300,fadeOutSpeed:300};})(jQuery);(function($){$.fn.jCarouselLite=function(o){o=$.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,pauseOnHover:false,beforeStart:null,afterEnd:null},o||{});return this.each(function(){var running=false,animCss=o.vertical?"top":"left",sizeCss=o.vertical?"height":"width";var div=$(this),ul=$("ul",div),tLi=$("li",ul),tl=tLi.size(),v=o.visible,paused=0;if(o.circular){ul.prepend(tLi.slice(tl-v-1+1).clone()).append(tLi.slice(0,v).clone());o.start+=v;}
o.pauseOnHover?ul.hover(function(){paused=1},function(){paused=0}):"";var li=$("li",ul),itemLength=li.size(),curr=o.start;div.css("visibility","visible");li.css({overflow:"hidden",'float':o.vertical?"none":"left"});ul.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});div.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var liSize=o.vertical?height(li):width(li);var ulSize=liSize*itemLength;var divSize=liSize*v;li.css({width:li.width(),height:li.height()});ul.css(sizeCss,ulSize+"px").css(animCss,-(curr*liSize));div.css(sizeCss,divSize+"px");if(o.btnPrev)
$(o.btnPrev).click(function(){return go(curr-o.scroll);});if(o.btnNext)
$(o.btnNext).click(function(){return go(curr+o.scroll);});if(o.btnGo)
$.each(o.btnGo,function(i,val){$(val).click(function(){return go(o.circular?o.visible+i:i);});});if(o.mouseWheel&&div.mousewheel)
div.mousewheel(function(e,d){return d>0?go(curr-o.scroll):go(curr+o.scroll);});if(o.auto)
setInterval(function(){go(curr+o.scroll);},o.auto+o.speed);function vis(){return li.slice(curr).slice(0,v);};function go(to){if(!running&&!paused){if(o.beforeStart)
o.beforeStart.call(this,vis());if(o.circular){if(to<=o.start-v-1){ul.css(animCss,-((itemLength-(v*2))*liSize)+"px");curr=to==o.start-v-1?itemLength-(v*2)-1:itemLength-(v*2)-o.scroll;}else if(to>=itemLength-v+1){ul.css(animCss,-((v)*liSize)+"px");curr=to==itemLength-v+1?v+1:v+o.scroll;}else curr=to;}else{if(to<0||to>itemLength-v)return;else curr=to;}
running=true;ul.animate(animCss=="left"?{left:-(curr*liSize)}:{top:-(curr*liSize)},o.speed,o.easing,function(){if(o.afterEnd)
o.afterEnd.call(this,vis());running=false;});if(!o.circular){$(o.btnPrev+","+o.btnNext).removeClass("disabled");$((curr-o.scroll<0&&o.btnPrev)||(curr+o.scroll>itemLength-v&&o.btnNext)||[]).addClass("disabled");}}
return false;};});};function css(el,prop){return parseInt($.css(el[0],prop))||0;};function width(el){return el[0].offsetWidth+css(el,'marginLeft')+css(el,'marginRight');};function height(el){return el[0].offsetHeight+css(el,'marginTop')+css(el,'marginBottom');};})(jQuery);jQuery(document).ready(function(){required=["shoutbox_name","shoutbox_message"];jQuery("#shoutboxForm").submit(function(){for(i=0;i<required.length;i++){var input=jQuery('#'+required[i]);if((input.val()=="")){input.addClass("needsfilled");}else{input.removeClass("needsfilled");}}
if(jQuery(":input").hasClass("needsfilled")){return false;}else{return true;}});jQuery(":input").focus(function(){if(jQuery(this).hasClass("needsfilled")){jQuery(this).val("");jQuery(this).removeClass("needsfilled");}});});$(document).ready(function(){var totWidth=0;var positions=new Array();var paused=0;var prevCurrent=0;$('#slides .slide').each(function(i){positions[i]=totWidth;totWidth+=$(this).width();if(!$(this).width())
{alert("Please, fill in width & height for all your images!");return false;}});$('#slides').width(totWidth);$('#slides .slide').hover(function(){paused=1;prevCurrent=current;},function(){paused=0;current=prevCurrent;});$('#gmenu ul li a').click(function(e,keepScroll){$('li.menuItem').removeClass('act').addClass('inact');$(this).parent().addClass('act');var pos=$(this).parent().prevAll('.menuItem').length;$('#slides').stop().animate({marginLeft:-positions[pos]+'px'},450);e.preventDefault();if(!keepScroll)clearInterval(itvl);});$('#gmenu ul li.menuItem:first').addClass('act').siblings().addClass('inact');var current=1;function autoAdvance()
{if(current==-1)return false;if(paused==1)return false;$('#gmenu ul li a').eq(current%$('#gmenu ul li a').length).trigger('click',[true]);current++;}
var changeEvery=10;var itvl=setInterval(function(){autoAdvance()},changeEvery*300);});