if($defined(window.jQuery)&&$type(jQuery.noConflict)=='function'){jQuery.noConflict();jQuery.noConflict()}function switchFontSize(ckname,val){var bd=$E('body');switch(val){case'inc':if(CurrentFontSize+1<7){bd.removeClass('fs'+CurrentFontSize);CurrentFontSize++;bd.addClass('fs'+CurrentFontSize)}break;case'dec':if(CurrentFontSize-1>0){bd.removeClass('fs'+CurrentFontSize);CurrentFontSize--;bd.addClass('fs'+CurrentFontSize)}break;default:bd.removeClass('fs'+CurrentFontSize);CurrentFontSize=val;bd.addClass('fs'+CurrentFontSize)}Cookie.set(ckname,CurrentFontSize,{duration:365})}function switchTool(ckname,val){createCookie(ckname,val,365);window.location.reload()}function createCookie(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString()}else expires="";document.cookie=name+"="+value+expires+"; path=/"}function gkAddEvent(obj,evType,fn){if(obj.addEventListener){obj.addEventListener(evType,fn,false);return true}else if(obj.attachEvent){var r=obj.attachEvent("on"+evType,fn);return r}else{return false}}Fx.Opacity=Fx.Style.extend({initialize:function(el,options){this.now=1;this.parent(el,'opacity',options)},toggle:function(){return(this.now>0)?this.start(1,0):this.start(0,1)},show:function(){return this.set(1)}});Fx.Width=Fx.Style.extend({initialize:function(el,options){this.element=$(el);this.element.setStyle('overflow','hidden');this.iniWidth=this.element.getStyle('width').toInt();this.parent(this.element,'width',options)},toggle:function(){var style=this.element.getStyle('width').toInt();if(style>0)return this.start(style,0);else return this.start(0,this.iniWidth)},show:function(){return this.set(this.iniWidth)}});Fx.Height=Fx.Style.extend({initialize:function(el,options){this.parent(el,'height',options);this.element.setStyle('overflow','hidden')},toggle:function(){return(this.element.offsetHeight>0)?this.custom(this.element.offsetHeight,0):this.custom(0,this.element.scrollHeight)},show:function(){return this.set(this.element.scrollHeight)}});window.addEvent('load',function(){new SmoothScroll();var tools=false;var tools_fx=null;var mod_fx=null;if($('btn_tools')){var pos=20+$('btn_tools').getCoordinates().width;var opened=false;$('popup_tools').getParent().setProperty('class','gk_hide').setStyles({'margin-right':pos+'px','display':'block'});$('popup_tools').setStyle('display','block');tools_fx=new Fx.Width($('popup_tools').getParent(),{duration:300}).set(0);$('btn_tools').addEvent('click',function(e){new Event(e).stop();if(!window.ie)tools_fx.toggle();else tools_fx.start((opened)?0:150);opened=!opened})}if($('stylearea')){$A($$('.style_switcher')).each(function(element,index){element.addEvent('click',function(event){var event=new Event(event);event.preventDefault();changeStyle(index+1)})});new SmoothScroll()}});function changeStyle(style){var file=tmplurl+'/css/style'+style+'.css';new Asset.css(file);new Cookie.set('gk36_style',style,{duration:200,path:"/"})}
