$.zoomBox = function(box) {
	$('#' + box + ' .blindfx').slideToggle();
	var ImageToggle 	= $('#' + box).children().children().children();
	if($(ImageToggle).attr('class') == 'openBox')
		$(ImageToggle).attr('class', 'closeBox');
	else
		$(ImageToggle).attr('class', 'openBox');
}


$(document).ready(function(){
	$('.prdDetailGroups').hide();
	$('.downloadBox').hide();
	$('.prd-hide').hide();
	$('.zoomBoxTitle').click(function(){
		if($(this).parent().find('.prdDetailGroups').css('display')  == 'none'){
			$(this).parent().find('.prdDetailGroups').show('slow');
			$(this).parent().find('.downloadBox').show('slow');
			$(this).parent().find('.prd-hide').show('slow');
		}
		else{
			$(this).parent().find('.prdDetailGroups').hide('slow');
			$(this).parent().find('.downloadBox').hide('slow');
			$(this).parent().find('.prd-hide').hide('slow');
		}
		return false;
	});
	
	$('.imageThumbs').click(function(){
		var clickedImage = $(this);
		var changeImage =$(this).parents('.prdImgParent').children('img');
		$(changeImage).fadeOut('slow');
		setTimeout(function() {
				$(changeImage).attr('src', $(clickedImage).attr('src'));
		}, 500);
		$(changeImage).fadeIn('slow');
		return false;
	});
});

