$(document).ready(function() {
	$('a').each(function(){
		$(this).bind('focus', function(){
			this.blur();
		})
	});

	$("#xmaslayer").fancybox({
		'frameWidth': 910,
		'frameHeight': 640,
		'padding': 0
	}).trigger('click');

	$("#playvid").fancybox({
		'frameWidth': 608,
		'frameHeight': 379,
		'hideOnContentClick': false
	});

	if($(window).height() < 600) {
		var frameHeight = 500;
	} else {
		var frameHeight = 700;
	}

	$(".productteaser a").fancybox({
		'frameWidth': 840,
		'frameHeight': frameHeight,
		'padding': 0
	});

	$("input[type=text], textarea").focus(function(){
		if($(this).val() == $(this).attr('defaultValue')) {
			$(this).val('');
		}
	});
	
	$("input[type=text], textarea").blur(function(){
		if ($(this).val() == '') {
			$(this).val($(this).attr('defaultValue'));
		}
	});

	$(function() {
		$('#headimage #slideimages').cycle({
		fx: 'fade',
		speed: 1000,
		timeout: 7000
		});
	}); 
	
	productSlider();
	
	minheightie6();
	
	var i = 1;

	$('div.download').each(function() {
		if(i % 3 == 0) {
			$(this).addClass('right');
		}

		i++;
	});
});

function minheightie6() {
	if($.browser.msie) {
		if($("#contentwrapper").height() < 440) {
			$("#contentwrapper").height(440);
		}
	}
}
