//jQuery.noConflict();
jQuery(document).ready(function($){
	jQuery(".album-photos a").fancybox({
		'zoomSpeedIn':	0, 
		'zoomSpeedOut':	0,
		'overlayShow': true,
		'overlayOpacity': 0.7,
		'overlayColor': '#000'
	});    
	jQuery("a.photobox").fancybox({
		'zoomSpeedIn':	0, 
		'zoomSpeedOut':	0,
		'overlayShow': true,
		'overlayOpacity': 0.7,
		'overlayColor': '#000'
	});    
	/*jQuery("a.youtube").fancybox({
		'zoomSpeedIn':	400, 
		'zoomSpeedOut':	100,
		'width': 425,
		'height': 344,
		'overlayShow': true,
		'hideOnContentClick': false,
		'overlayOpacity': 0.7,
		'overlayColor': '#000',
		'type': 'inline'
	}); */   
	jQuery("a.autopopup").fancybox({
		'zoomSpeedIn':	0, 
		'zoomSpeedOut':	0,
		'overlayShow': true,
		'hideOnContentClick': false,
		'overlayOpacity': 0.7,
		'overlayColor': '#000'
	});  
	jQuery("a.youtube").click(function() {
		$.fancybox({
				'padding'		: 0,
				'autoScale'		: false,
				'transitionIn'	: 'none',
				'transitionOut'	: 'none',
				'overlayOpacity': 0.7,
				'overlayColor'	: '#000',
				'title'			: this.title,
				'width'			: 680,
				'height'		: 495,
				'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
				'type'			: 'swf',
				'swf'			: {
				   	 'wmode'		: 'transparent',
					'allowfullscreen'	: 'true'
				}
			});
	
		return false;
	});
	jQuery("a.autopopup2").fancybox({
		'zoomSpeedIn':	0, 
		'zoomSpeedOut':	0,
		'width': 443,
		'height': 500,
		'overlayShow': true,
		'hideOnContentClick': false,
		'overlayOpacity': 0.6,
		'overlayColor': '#000'
	});  
	if(jQuery("a#autopopup").length>0){
		if(jQuery.cookie('autopopup')==null){ // eerste bezoek
			jQuery.cookie('autopopup',true, { expires: 2 });
			 jQuery("a#autopopup").click();
			 setTimeout("jQuery.fn.fancybox.close()", 5000);
		}
	}
	if(jQuery("a#autopopup2").length>0){
		jQuery("a#autopopup2").click();
	}
	
 	$("input.input-text, textarea.input-textarea").addClass("idle");
    $("input.input-text, textarea.input-textarea").focus(function(){
            $(this).addClass("activeField").removeClass("idle");
    }).blur(function(){
            $(this).removeClass("activeField").addClass("idle");
    });
		  
});
function switchLanguage(lang) {
    u = location.href.split('/');
    u[5] = lang;
    location.href = u.join('/');
}

function add_smiley(smiley)
{
    document.getElementById('comment_form').comment.value += " " + smiley + " ";
    document.getElementById('comment_form').comment.focus();
}

/* SIFR 
var rockwell = {
	src: '/templates/flash/rockwell.swf'
	,ratios: [6, 1.41, 9, 1.35, 15, 1.29, 21, 1.25, 22, 1.22, 27, 1.24, 29, 1.21, 34, 1.22, 41, 1.21, 45, 1.2, 46, 1.21, 59, 1.2, 68, 1.19, 69, 1.2, 96, 1.19, 97, 1.18, 102, 1.19, 103, 1.18, 107, 1.19, 108, 1.18, 112, 1.19, 114, 1.18, 116, 1.19, 120, 1.18, 121, 1.19, 1.18]
};

//sIFR.useStyleCheck = true;
sIFR.activate(rockwell);

sIFR.replace(rockwell, {
  selector: 'h1'
  ,wmode: 'transparent'
  ,css: [
    '.sIFR-root { text-align: center; letter-spacing: 1; color: #6da425; font-weight: bold; }'
    ,'a { text-decoration: none;color: #6da425; }'
    ,'a:hover { color: #CCCCCC; }'
  ]
});

sIFR.replace(rockwell, {
  selector: 'h2'
  ,wmode: 'transparent'
  ,css: [
    '.sIFR-root { text-align: center; letter-spacing: 1; color: #6da425; font-weight: bold;}'
    ,'a { text-decoration: none;color: #6da425; }'
    ,'a:hover { color: #CCCCCC; }'
  ]});


sIFR.replace(rockwell, {
  selector: 'h3.white'
  ,wmode: 'transparent'
  ,css: [
    '.sIFR-root { text-align: center; letter-spacing: 1; color: #FFFFFF; font-weight: bold;}'
    ,'a { text-decoration: none; color: #FFFFFF; }'
    ,'a:hover { text-decoration: underline; color: #FFFFFF; }'
  ]});

sIFR.replace(rockwell, {
  selector: 'h3.black'
  ,wmode: 'transparent'
  ,css: [
    '.sIFR-root { text-align: center; letter-spacing: 1; color: #000000; font-weight: bold;}'
    ,'a { text-decoration: none; color: #000000; }'
    ,'a:hover { text-decoration: underline; color: #000000; }'
  ]});

sIFR.replace(rockwell, {
  selector: 'h3'
  ,wmode: 'transparent'
  ,css: [
    '.sIFR-root { text-align: center; letter-spacing: 1; color: #6da425; font-weight: bold;}'
    ,'a { text-decoration: none;color: #6da425; }'
    ,'a:hover { text-decoration: underline; color: #6da425; }'
  ]});
*/

