$(document).ready(function(){
  
	$('.view-list li a').click(function(){
	  
		var src = $(this).children('img').attr("src");
		$('.twocolumns .col-1 .view img').attr('src', src);
		return false;
	});
});

$(document).ready(function(){
  Cufon.replace('#nav a, #sidebar .cell .btn, #sidebar .shipping h3, #footer .box .heading h3, #content .block-2 .additional .panel .btn, .text_btn_span', { fontFamily: 'Myriad Pro Condensed'});
  Cufon.replace('#sidebar .cell .social-list span', { fontFamily: 'Myriad Pro Condensed', hover:true});
	//initCufon();
});



jQuery(document).ready(function(){
	/*jQuery(".gallery .panel a").click(function(){
		if($(this).hasClass("active"))
			return false;
		$(".gallery .panel a.active").removeClass("active");
		var a = jQuery(this);
		a.addClass("active")
		var index = $(".gallery .panel li").index(a.parent());
		$(".gallery .holder ul li.active").fadeOut(500, function(){
			$(this).removeClass("active")
			$(".gallery .holder ul li:eq("+index+")").fadeIn(500, function(){
				$(this).addClass("active");
			});
		});
		return false;
	});*/
	jQuery('.gallery ul:first').innerfade({ 
		speed: 'slow', 
		timeout: 8000, 
		type: 'sequence', 
		containerheight: '285px'
	});
	jQuery('.gallery ul.panel').hide();
	jQuery('.gallery').append("<div class='panel'><a href='http://transfermaster.com/content/beds-manufacturer-contact' class='text_btn'>&#160;</a></div>");
	

});

$(document).ready(function(){
	var size = $(".checkout table.sticky-enabled th").size() - 1;
	$(".checkout table.sticky-enabled th:eq(0)").addClass("left");
	$(".checkout table.sticky-enabled th:eq("+size+")").addClass("right");
});



$(document).ready(function(){
	$(".video-fancybox a").click(function(){
		$.fancybox({
			'padding'		: 0,
			'autoScale'		: false,
			'transitionIn'  : 'elastic',
            'transitionOut' : 'elastic',
			'title'			: this.title,
			'width'			: 680,
			'height'		: 495,
			'href'			: this.href.replace(new RegExp("watch\\?v=", "i"), 'v/') + '&autoplay=1',
			'type'			: 'swf',
			'swf'			: {
			   	 'wmode'		: 'transparent',
				'allowfullscreen'	: 'true',
				'autoPlay':'true'
			},
			'overlayOpacity':0.4,
			'overlayColor':'#000',
			'centerOnScroll':true
		});

		return false;
	});
});
