/**///Call noconflict if detect jquery//Apply jquery.noConflict if jquery is enabled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=/";}//addEvent - attach a function to an event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;  } }window.addEvent('load', function() {    new SmoothScroll();     //    if($('stylearea')){    	$$('.style_switcher').each(function(element,index){    		element.addEvent('click',function(event){                var event = new Event(event);    			event.preventDefault();    			changeStyle(index+1);    		});    	});    }    // GK Tab light suffix fix    if($$('.cufar_tab_container0-style1')) {    	$$('.cufar_tab_container0-style1').each(function(el){    		el.setStyle('width', (el.getSize().size.x - 4)+"px");    	});    }    //    if($('btn_login')) {    	var close_text = $('cufar-buttons').getElement('.cufar-translation').innerHTML;    	var open_text = $('btn_login').getElement('span').innerHTML;    	var login_fx = new Fx.Style($('cufar-popup'), 'height',{duration:200, transition: Fx.Transitions.Circ.easeInOut}).set(0);    	var login_fx1 = new Fx.Style($$('#cufar-popup div')[0], 'height',{duration:200, transition: Fx.Transitions.Circ.easeInOut}).set(0);    	var popup_fx = new Fx.Style($$('.cufar-popup-wrap')[0], 'opacity', {duration:250}).set(0);    	var popup = $$('#cufar-popup #system-message')[0];    	var forms_visible = false;    	    	$('btn_login').addEvent('click', function(e){    		new Event(e).stop();    		    		if(forms_visible) {    			(function() {     				$('btn_login').removeClass('activated');     				$('cufar-popup').removeClass('activated');     			}).delay(200);    			popup_fx.start(0);    			$('btn_login').getElement('span').innerHTML = open_text;    		}    		    		if(!forms_visible) {    			$('btn_login').addClass('activated');    			$('cufar-popup').addClass('activated');    			(function(){ popup_fx.start(1); }).delay(200);    			$('btn_login').getElement('span').innerHTML = close_text;    		}    		    		(!forms_visible) ? login_fx.start($$('#cufar-popup .main')[0].getSize().size.y) : login_fx.start(0);    		(!forms_visible) ? login_fx1.start($$('#cufar-popup .main')[0].getSize().size.y) : login_fx1.start(0);    		forms_visible = !forms_visible;    	});      }});// Function to change stylesfunction changeStyle(style){	var file = tmplurl+'/css/style'+style+'.css';	new Asset.css(file);	new Cookie.set('gk47_style',style,{duration: 200,path: "/"});}// JCaptionCheckfunction JCaptionCheck(){ return (typeof(JCaption) == "undefined")?  false: true; }if(!JCaptionCheck()) {	var JCaption = new Class({		initialize: function(selector)		{			this.selector = selector;			var images = $$(selector);			images.each(function(image){ this.createCaption(image); }, this);		},		createCaption: function(element)		{			var caption   = document.createTextNode(element.title);			var container = document.createElement("div");			var text      = document.createElement("p");			var width     = element.getAttribute("width");			var align     = element.getAttribute("align");			var docMode = document.documentMode;			//Windows fix			if (!align)				align = element.getStyle("float");  // Rest of the world fix			if (!align) // IE DOM Fix				align = element.style.styleFloat;			text.appendChild(caption);			text.className = this.selector.replace('.', '_');			if (align=="none") {				if (element.title != "") {					element.parentNode.replaceChild(text, element);					text.parentNode.insertBefore(element, text);				}			} else {				element.parentNode.insertBefore(container, element);				container.appendChild(element);				if ( element.title != "" ) {					container.appendChild(text);				}				container.className   = this.selector.replace('.', '_');				container.className   = container.className + " " + align;				container.setAttribute("style","float:"+align);				//IE8 fix				if (!docMode|| docMode < 8) {					container.style.width = width + "px";				}			}		}	});	document.caption = null;	window.addEvent('load', function() {		var caption = new JCaption('img.caption')		document.caption = caption	});}
