function addToCart(a)
	{
	if (a=="Cloth" || a=="Paper" || a=="DVD" || a=="Email")
		{
		document.getElementById("add"+a).submit()
		}
	else
		{
		document.getElementById(a).submit()
		}
	}

$(window).load(function(){

    if($('.series-images').length){
        $('.series-images span img').each(function(index) {
            var width=$(this).width();
            $(this).closest('span').css('width', width);
        });
    }
});

$(document).ready(function() {
	
	

	if($('.columns .column.second').height()>$('.columns .column.first').height()){
		$('.columns .column.first').height($('.columns .column.second').height()+20);
	}
	if($('ul.journal-actions').height()>$('ul.journal-details').height()){
		$('ul.journal-details').height($('ul.journal-actions').height()+20);
	}
    
	$('.anythingSlider').anythingSlider({
        easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
        autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
        delay: 9000,                   // How long between slide transitions in AutoPlay mode
        startStopped: false,            // If autoPlay is on, this can force it to start stopped
        animationTime: 500,             // How long the slide transition takes
        buildNavigation: true,          // If true, builds and list of anchor links to link to each slide
		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
		startText: "Go",             	// Start text
        stopText: "Stop"               	// Stop text
    });
    
    $('#primary-menu li.in').hover(
    	function(){
    		$(this).addClass('hover');
    	},
    	function(){
    		$(this).removeClass('hover');
    	}
    );
    
});
