jQuery.noConflict();
/**
  * Euroweb Group | Euroweb Internet GmbH | ew.de/
  * @author: s.bleilevens
  * 
  * @description: customized script file
  */
if(!doc) { var doc = document; }; if(!win) { var win = window; };
(function(){
/** compressed system functions */
var _sys={addEvent:function(obj,type,fn){if(obj.attachEvent){obj['e'+type+fn]=fn;obj[type+fn]=function(){obj['e'+type+fn](win.event)};obj.attachEvent('on'+type,obj[type+fn])}else{obj.addEventListener(type,fn,false)}},removeEvent:function(obj,type,fn){if(obj.detachEvent){obj.detachEvent('on'+type,obj[type+fn]);obj[type+fn]=null}else{obj.removeEventListener(type,fn,false)}}};win.sys=_sys;

var _euroweb = {
	mailmask: function(){
		var links = doc.getElementsByTagName('a'), linkElem, mail, domain, i;
		for (i = links.length; i--;) {
			linkElem = links[i];
			if (linkElem.className == 'escape') {
				mail = linkElem.firstChild; domain = linkElem.lastChild;
				mail.nextSibling.firstChild.innerHTML = '@';
				linkElem.href = "mailto:" + mail.data + '@' + domain.data;
			};
		};
	}
};

win.euroweb = _euroweb;
sys.addEvent(win,'load',euroweb.mailmask);

/* */
jQuery(doc).ready(function(){
		jQuery('a[rel^="lightbox"],a[rel^="fancybox"]').fancybox({
			'titleShow': false
		});
	/*active: 'accActive',
		toggle: 'accToggle',
		content: 'accContent',
		accAnchor: 'accAnchor',
		multi: 'multi',
		openFirst: true*/
});

/* custom specific scripts */
var _schraufstaedter = {
	timeliner: function(id,use_jQuery){
		if(use_jQuery){
			jQuery(doc).ready(function(){
								  /*
				var timeliner = jQuery('#'+id);
				var waypoints = new Array();
				waypoints = jQuery(timeliner).children('.timeline_waypoint');
				
				timeliner.html('<div id="'+id+'_timeline" class="timeliner_js"></div><div id="" style="display:block;">' + timeliner.html() + '</div>');
				timeliner = jQuery('#'+id+'_timeline');
				
					alert(waypoints[11].innerHTML); 
				
				var x, waypoints_length = waypoints.length, waypoint, waypoint_width = timeliner.width() / waypoints_length;
				
				for(x=waypoints_length;x--;){
					waypoint = waypoints[x];
					timeliner.html(timeliner.html() + _schraufstaedter.timeliner_createWaypoint(waypoint,waypoint_width));
				};
				
				// clear
				timeliner.html(timeliner.html() + '<div class="clear"></div>');
				*/
				var $timeline_ressource = jQuery('#'+id), timeline_width = $timeline_ressource.width();
				var $waypoints = $timeline_ressource.children('.timeline_waypoint'), waypoints_count = $waypoints.length, waypoint_width = Math.round(timeline_width/waypoints_count)-1;

				var timeline_html = $timeline_ressource.innerHTML; // html-code
				
				var timeline_id = 'js_'+id;
				
				$timeline_ressource.prepend('<div id="'+timeline_id+'" class="timeliner_js"></div>');
				
				var timeline = jQuery('#'+timeline_id);
				var x, $current_waypoint;
				for(x=waypoints_count;x--;){
					current_waypoint = $waypoints[x];
					jQuery(timeline).prepend(_schraufstaedter.timeliner_createWaypoint(current_waypoint,waypoint_width));
				};
			});
		} else {
			alert('Please include jQuery');
		};
	},
	
	timeliner_createWaypoint: function(waypoint,waypoint_width){
		var year = jQuery(waypoint).children('strong:first-child').html();
		return '<div class="timeline_waypoint" style="width:' + (waypoint_width-1) +'px;"><strong class="">'+year+'</strong><span class="timeline_waypoint_borders"></span></div>';
	}
};

win.schraufstaedter = _schraufstaedter;
})();


 eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('7(!f)2 f=s;7(!k)2 k=u;d y(4){2 4=0.x({1:\'v\',3:\'w\',5:\'z\',9:\'9\',8:\'8\',b:m},4);2 1=4.1;2 3=4.3;2 5=4.5;2 9=4.9;2 8=4.8;2 b=4.b;0(\'.\'+5).A();0(\'.\'+3+\'.\'+8).p(d(){7(0.q(0(6).r())==\'\'){0(6).t()}});$e=0(f.P.L);$1=$e.c(3)?$e:(b?0(\'.\'+3+\':K\'):o);7($1){$1.j(1).h(\'.\'+5).M(N,d(){7($e.c(3)){2 l=$1.O().l;0(k).J(l)}})}0(\'.\'+3+\', .\'+9).B(d(){$6=0(6);$a=$6.c(3)?$6:0(0(6).I(\'D\'));2 i=$a.h(\'.\'+5).C(\':i\')?m:o;0(\'.\'+5).E(g);0(\'.\'+1).F(1);7(i){7($a.c(8)){$a.j(1).H(\'.\'+3).n(g)}G{$a.j(1).h(\'.\'+5).n(g)}}})};',52,52,'jQuery|active|var|toggle|settings|content|this|if|multi|accAnchor|toggler|openFirst|hasClass|function|urlElem|doc|300|next|hidden|addClass|win|top|true|slideDown|false|each|trim|text|document|remove|window|accActive|accToggle|extend|acc|accContent|hide|click|is|href|slideUp|removeClass|else|nextUntil|attr|scrollTop|first|hash|show|10|offset|location'.split('|'),0,{}));
