function fadeMessages() {	$('.msg').wrap('<div class="msg-holder" />');	$('.msg').delay(3000).animate({opacity:0}, 500, function() {		$('.msg-holder').slideUp();	});}function checkEmail(emailAddress) {		var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;	return emailPattern.test(emailAddress);}function checkLogInForm() {	var errors = '';	if (checkEmail(document.loginForm.email.value)==false)		errors += '- Email\n';	if (document.loginForm.password.value.length == 0 || document.loginForm.password.value=='Password' || document.loginForm.password.value=='PASSWORD')		errors += '- Password\n';	if (errors != '') {		errors = 'Please complete the following:\n\n'+errors;		window.alert(errors);		return false;	} else {		return true;	}}function disableDownloadLink(target) {	$(target).parent('div')		.css('display', 'none')		.next('div').removeClass('hidden');	return true;}$(document).ready(function(){	$.fn.delay = function(time, callback) {		return this.animate({ opacity: '+=0' }, time, callback);	}	replaceStyles();	fadeMessages();	$(".cols12Span .panel.grid").css({		'min-height': $(".col1").height()-($(".cols12Span .panelHeader").height()+50)	});	$(".product .cols12Span").css({'min-height': $(".col1").height()});	$(".disabled").click(function(e) {		e.preventDefault();	});	if ($('.fixed').length) {		var pad = 16;		cols12Span_height = $(".cols12Span").height();		$('.col1-substitute').css({'height':pad});		var nav_pos = ($('.fixed').offset().top-pad);		$(window).scroll(function(e) {						if ((document.documentElement.scrollTop || document.body.scrollTop) >= ($('.cols12Span').offset().top+$('.cols12Span').height())-($('.fixed').height()+pad)) {							$('.col1-substitute').addClass('visible');				$('.fixed')					.removeClass('stick-top')					.addClass('stick-bottom');				$('.ie .fixed').css({'left': 21});			} else if ( (document.documentElement.scrollTop || document.body.scrollTop) >= nav_pos) {							$('.col1-substitute').addClass('visible');				$('.fixed')					.removeClass('stick-bottom')					.addClass('stick-top');				$('.ie .fixed').css({'left': $('.cols12Span').offset().left-($('.fixed').width()+24)});							} else {				$('.col1-substitute').removeClass('visible');				$('.fixed')					.removeClass('stick-bottom')					.removeClass('stick-top');				$('.ie .fixed').css({'left': 21});							}		}).scroll();				$(window).resize(function(e) {			$('.ie .fixed').css({'left': $('.cols12Span').offset().left-($('.fixed').width()+24)});		});	}	$('#topOfPage').click(function(e) {		e.preventDefault();		$('html,body').stop(true).animate({scrollTop:0},500);	});	});function confirm_action(message) {	var agree=confirm(message);	if (agree)        return true;	else        return false;} function player(location) {	w = 384;	h = 180;					if (navigator.userAgent.indexOf('Safari') != -1)	{ 		w=w-2;		h=h-1;	}		pop = window.open(location, 'almightyPlayer', 'toolbar=no, location=no, scrolling=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width='+w+', height='+h);	pop.focus();}//------------------------------------------------------------------------------function jqLoadContent(elementSelector, sourceURL) {	var ele = "#"+elementSelector;	$(ele).parent().height($(ele).height());	$(ele).animate( {'opacity':0}, 250, function() {		$(ele).load(sourceURL, {}, function() {					var newheight = $(ele).height();			$(ele).parent().animate(				{height: newheight},				{duration: 250});			$(ele).fadeIn('slow');			$(ele).animate( {'opacity':1}, 250);		})	});}function replaceStyles() {	$('a.button')		.addClass('replaced')		.wrap('<span></span>')		.prepend('<span class="buttonL">&nbsp;</span>')		.append('<span class="buttonR">&nbsp;</span>');		$('.panel .date')		.addClass('replaced')		.wrap('<span></span>')		.prepend('<div class="date-top"></div>')		.append('<div class="date-bottom"></div>');	$('.filter-by-letter')		.addClass('replaced')		.wrap('<span></span>')		.prepend('<span class="filterL">&nbsp;</span>')		.append('<span class="filterR">&nbsp;</span>');}function replaceStylesDiv(elementSelector) {	$("#"+elementSelector+' a.button').prepend('<span class="buttonL">&nbsp;</span>')			.append('<span class="buttonR">&nbsp;</span>');}function getTallest(group) {	var tallest = 0;	group.each(function() {		var thisHeight = $(this).height();		if(thisHeight > tallest) {			tallest = thisHeight;		}	});	return tallest;}
