function generateFooterCaption(){

    var selection = Math.floor(Math.random()* 7)+1;

    var stringCaptionArray = new Array(6);

    stringCaptionArray[1] = "{When Jesus comes back, these crazy, greedy, capitalistic men are gonna kill him again - Mike Tyson}";
    stringCaptionArray[2] = "{If Jesus was a Jew, how come he has a Mexican first name? - Billy Connolly}";
    stringCaptionArray[3] = "{Jesus was all right, but his disciples were thick and ordinary - John Lennon}";
    stringCaptionArray[4] = "{Whatever I will become will be what God has chosen for me - Elvis Presley}";
    stringCaptionArray[5] = "{I'm a Believer - The Monkees}";
    stringCaptionArray[6] = "{God gave rock and roll to you - Kiss}";

    $('#footer_caption_h').text(stringCaptionArray[selection]);

}

$(document).ready(function(){

    $('SELECT:not(.nostyle)').selectbox();

    generateFooterCaption();

    var jqzoomoptions = {
        title: false,
        zoomWidth: 460,
        zoomHeight: 400,
        xOffset: 35,
        yOffset: 20,
        showEffect: 'fadein',
        hideEffect: 'fadeout',
        fadeinSpeed: 'medium',
        fadeoutSpeed: 'medium'
    };

    $('.jqzooms').jqzoom(jqzoomoptions);
	
    $('a[rel*=facebox]').facebox();

    $(document).pngFix();


    // HOME PAGE VIDEO BEGIN
	
    $('#homepage_video_play').click(function() {
        $('.homepage_video_movie').fadeIn(500);
        $('.homepage_video_splash').fadeOut(500);
        return false;
    });

    // HOME PAGE VIDEO END

	$('#nav7').click(function(){
		if($('#search_form').hasClass('active')){
			$('#search_form').css('visibility', 'hidden');
			$('#search_form').removeClass('active');
		}else{
			$('#search_form').css('visibility', 'visible');
			$('#search_form').addClass('active');
		}
		return false;
	});

    $('#seach_input').focus(function() {
        if ( $(this).val() == 'search' ) {
            $(this).val('');
        }
    });
	
    $('#seach_input').blur(function() {
        if ( !$(this).val() ) {
            $(this).val('search');
        }
    });

    $('.big_img_swap').click(function(){
        var src = $(this).attr("src");
        src = src.replace("2.jpg", ".jpg");
        src = src.replace("2.gif", ".gif");
        $("#large_img_target").css('background-image','url('+src+')');
    });
    
    $('.delivery_spr').addClass('active');
    $('#care_box').hide();

    //product info links/popups
    $('#returns_link').click(function() {
        $('#returns_box').show('slow');
        $('#care_box').hide();
        $('.delivery_spr').addClass('active');
        $('.care_guide_spr').removeClass('active');
    });
	
    $('#care_link').click(function() {
        $('#returns_box').hide();
        $('#care_box').show('slow');
        $('.care_guide_spr').addClass('active');
        $('.delivery_spr').removeClass('active');
    });

    $('.delivery_button_link').mouseover(function(){
        $(this).find(".delivery_button_spr").attr("src", $(".delivery_button_spr").attr("src").replace(/delivery_off/, 'delivery_on'));
    });
    $('.delivery_button_link').mouseout(function(){
        $(this).find(".delivery_button_spr").attr("src", $(".delivery_button_spr").attr("src").replace(/delivery_on/, 'delivery_off'));
    });

    $('.delivery_highlight').click(function(){
        
    });

})

var counter = 20;
var evil_counter = 20;
	
function MM_swapImage() { //v3.0
    var i,j=0,x,a=MM_swapImage.arguments;
    document.MM_sr=new Array;
    for(i=0;i<(a.length-2);i+=3)
        if ((x=MM_findObj(a[i]))!=null){
            document.MM_sr[j++]=x;
            if(!x.oSrc) x.oSrc=x.src;
            x.src=a[i+2];
        }
}

	
	
	
	
