//Colorbox
$(document).ready(function(){
	$(".popup").colorbox();
	$(".preview").colorbox();
	$(".596x709").colorbox({width:"600px", height:"713px", iframe:true});
	$(".670x850").colorbox({width:"674px", height:"854px", iframe:true});
	$(".600x709").colorbox({width:"604px", height:"713px", iframe:true});
	$(".670x1000").colorbox({width:"674px", height:"1004px", iframe:true});
	$(".670x709").colorbox({width:"674px", height:"713px", iframe:true});
	$(".596x510").colorbox({width:"600px", height:"514px", iframe:true});
	$(".670x816").colorbox({width:"674px", height:"820px", iframe:true});					
	$(".new").colorbox({width:"350px", height:"185px", iframe:true});	
});

//Mail
function UnCryptMailto( s )
    {
        var n = 0;
        var r = "";
        for( var i = 0; i < s.length; i++)
        {
            n = s.charCodeAt( i );
            if( n >= 8364 )
            {
                n = 128;
            }
            r += String.fromCharCode( n - 1 );
        }
        return r;
    }

    function linkTo_UnCryptMailto( s )
    {
        location.href=UnCryptMailto( s );
    }
	
//FAQ's
window.addEvent('domready',function() {
			$$('#faqs h3').each(function(header,i) {
				var state = false, answer = header.getNext('div');
				answer.slide('out');
				header.addEvent('click',function(e) {
					state = !state;
					answer.slide(state ? 'in' : 'out');
					if(state) {
						header.addClass('active');
					}
					else {
						header.removeClass('active');
					}
				});
									answer.setStyles({
						overflow: '',
						height: 'auto'
					});
							});
		});

