$(document).ready(function(){
	// Plans toggle
	$(".plan-swap a").click(function(event) {
		event.preventDefault();
		$(".swapimg").attr("src", $(this).attr("href"));
		$(".plan-swap a").removeClass("highlight");
		$(this).addClass("highlight");
	});
	// Cycle for home quotes
	$('.cycleMe').cycle({
		fx: 'fade',
		speed:   1000, 
		timeout: 3500
	});
	
	$('a.external').click(function(){
		window.open(this.href);
		return false;
	});
	
	$('a.brightlink').css({ opacity: 0.75 }).hover(function() { 
    $(this).stop().animate({opacity: 1},100); 
		}, function() { 
			$(this).stop().animate({opacity: 0.75},250); 
	});
	
	
	$("a[rel=group1], a.fancybox").fancybox({
		'overlayOpacity'	:	0.85,
		'overlayColor'		: '#fff'
	});
	
	$(".fancyboxvideo").click(function() {
	$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'title'			: this.title,
			'width'		: 640,
			'height'		: 384,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
			'type'			: 'swf',
			'swf'			: {
			   	 'wmode'		: 'transparent',
				'allowfullscreen'	: 'true'
			}
		});

	return false;
});


});


window.gOverride = {
urlBase: 'http://gridder.andreehansson.se/releases/latest/',
	gColor: '#EEEEEE',
	gColumns: 16,
	gOpacity: 0.35,
	gWidth: 10,
	pColor: '#C0C0C0',
	pHeight: 15,
	pOffset: 0,
	pOpacity: 0.55,
	center: true,
	gEnabled: false,
	pEnabled: false,
	setupEnabled: true,
	fixFlash: true,
	size: 960
}

createGridder = function() {
document.body.appendChild(
  document.createElement('script'))
	.src='/js/960.gridder.js';
}


