$(document).ready(function(){	
$("#logo_bw, #partners  ul li a").fadeTo("fast",0.5);$("#logo_bw, #partners  ul li a").hover(function(){$(this).fadeTo("fast",1.0)},function(){$(this).fadeTo("fast",0.5)});$('#close_btn').click(function(){$('#browserInfo').slideUp("fast")});$("ul.languages li:odd").addClass("even");$("div.language_menu p").hover(function(){$(this).parent().find("ul.languages").slideDown('fast').show();$(this).parent().hover(function(){},function(){$(this).parent().find("ul.languages").slideUp('fast')})}).hover(function(){$(this).addClass("subhover")},function(){$(this).removeClass("subhover")});$('a[rel="external"]').click(function(){window.open($(this).attr('href'));return false});$('a[rel="external"]').filter(function(){return this.hostname&&this.hostname!==location.hostname}).addClass('externalLink');$("a").focus(function(){$(this).blur()});
$.easing.custom = function (x, t, b, c, d) {
var s = 1.70158; 
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;}		
$("#chained").scrollable({size: 4, clickable: false, easing: 'custom', speed: 1000}).autoscroll({steps: 1, interval: 10000, easing: 'custom', speed: 1000}).circular();
$("#nav ul").tabs("#panes > div", {effect: 'fade', fadeOutSpeed: 400});
$.easing.def="jswing";$('.extend_list_btn h3').click(function(e){var a=$(this).parent().next();$('.extend_list_content').not(a).slideUp('slow');a.slideToggle('slow');e.preventDefault()})
$("div.items div.scroll_item").hover(function(){$(this).find("span").stop().fadeTo('fast',0,function(){$(this).hide()})},function(){$(this).find("span").stop().fadeTo('slow',1).show()});
$("a[href$='.pdf']").addClass("pdf");$("a[href$='.doc'], a[href$='.txt'], a[href$='.rft']").addClass("txt");$("a[href$='.zip'], a[href$='.rar']").addClass("zip");
$('#fontsizer').jfontsizer({applyTo:'#text_content',changesmall:'2',changelarge:'4',expire:30});
(function($){var version='1.1';var locationPath=filterPath(location.pathname);$.fn.extend({smoothScroll:function(options){this.each(function(){var opts=$.extend({},$.fn.smoothScroll.defaults,options);$(this).bind('click',function(event){var link=this,$link=$(this),hostMatch=((location.hostname===link.hostname)||!link.hostname),pathMatch=opts.scrollTarget||(filterPath(link.pathname)||locationPath)===locationPath,thisHash=link.hash&&'#'+link.hash.replace('#',''),include=true;if(!opts.scrollTarget&&(!hostMatch||!pathMatch||thisHash.length==1)){include=false}else{var exclude=opts.exclude,elCounter=0,el=exclude.length;while(include&&elCounter<el){if($link.is(exclude[elCounter++])){include=false}}var excludeWithin=opts.excludeWithin,ewlCounter=0,ewl=excludeWithin.length;while(include&&ewlCounter<ewl){if($link.parents(excludeWithin[ewlCounter++]+':first').length){include=false}}}if(include){opts.scrollTarget=opts.scrollTarget||thisHash;opts.link=link;event.preventDefault();$.smoothScroll(opts)}})});return this}});$.smoothScroll=function(options,px){var opts,scrollTargetOffset,scrollElem=scrollableElement('html','body');if(typeof options==='number'){opts=$.fn.smoothScroll.defaults;scrollTargetOffset=options}else{opts=$.extend({},$.fn.smoothScroll.defaults,options);scrollTargetOffset=px||$(opts.scrollTarget).offset().top}opts=$.extend({link:null},opts);$(scrollElem).animate({scrollTop:scrollTargetOffset+opts.offset},{duration:opts.speed,easing:opts.easing,complete:function(){if(opts.afterScroll&&$.isFunction(opts.afterScroll)){opts.afterScroll.call(opts.link,opts)}}})};$.smoothScroll.version=version;$.fn.smoothScroll.defaults={exclude:[],excludeWithin:[],offset:0,scrollTarget:null,afterScroll:null,easing:'swing',speed:400};function scrollableElement(els){for(var i=0,argLength=arguments.length;i<argLength;i++){var el=arguments[i],$scrollElement=$(el);if($scrollElement.scrollTop()>0){return el}else{$scrollElement.scrollTop(1);var isScrollable=$scrollElement.scrollTop()>0;$scrollElement.scrollTop(0);if(isScrollable){return el}}}return[]}function filterPath(string){return string.replace(/^\//,'').replace(/(index|default).[a-zA-Z]{3,4}$/,'').replace(/\/$/,'')}})(jQuery);
$("a.map").fancybox({'padding':0,'frameWidth':800,'frameHeight':450});$("a.zoom1").fancybox({'zoomSpeedIn':500,'zoomSpeedOut':500,'easingIn':'swing','easingOut':'swing','transitionIn':'fade','transitionOut':'fade','titleShow':false,'centerOnScroll':true});$("a.zoom2").fancybox({'transitionIn':'fade','transitionOut':'fade','titlePosition':'over','titleFormat':function(title,currentArray,currentIndex,currentOpts){return'<span id="fancybox-title-over">'+(currentIndex+1)+' / '+currentArray.length+'</span>'}});$("#fancy_print").fancybox({'width':840,'height':'90%','autoScale':false,'transitionIn':'fade','transitionOut':'fade','hideOnOverlayClick':false,'type':'iframe'});$("#fancy_contact-form").fancybox({'frameWidth':900,'frameHeight':510,'hideOnOverlayClick':false});
$('#toplink a').smoothScroll();tooltip();
});		
jQuery.fn.safe_mail=function(username,domain_name,domain_ext,link_text){if(link_text){link_txt=link_text}else{link_txt="link"}if(link_txt=="link"){mail_link="<a "+" href"+"="+"'mail"+"to"+":"+username+"@"+domain_name+"."+domain_ext+"'>"+username+"@"+domain_name+"."+domain_ext+"</a>"}else{mail_link="<a "+" href"+"="+"'mail"+"to"+":"+username+"@"+domain_name+"."+domain_ext+"'>"+link_txt+"</a>"}$(this).append(mail_link)};
this.tooltip=function(){xOffset=10;yOffset=20;$("a.tooltip").hover(function(e){this.t=this.title;this.title="";$("body").append("<p id='tooltip'>"+this.t+"</p>");$("#tooltip").css("top",(e.pageY-xOffset)+"px").css("left",(e.pageX+yOffset)+"px").fadeIn("slow")},function(){this.title=this.t;$("#tooltip").remove()});$("a.tooltip").mousemove(function(e){$("#tooltip").css("top",(e.pageY-xOffset)+"px").css("left",(e.pageX+yOffset)+"px")})};

