	/* Lavalamp Menu initialize */
	$(function() { $(".lavaLamp").lavaLamp({ fx: "easeOutBack", speed: 800}) });
	
	/* Select all links that contains lightbox in the attribute rel */
	$(function() {
		$('a[@rel*=lightbox]').lightBox(); 
	});
	
	/* Sitemap Toggle */
	$(function(){
		$('a.sitemap-toggle').click(function(){
			$('#sitemap').slideToggle();
			$('a.sitemap-toggle').text($(this).text() == 'Site Map' ? 'Hide Site Map' : 'Site Map');
			$.scrollTo('#top');
			return false;
		});
		$('#sitemap').css('display', 'none');
	});
	
	$(document).ready(function() {
	$("#frm-request").validate({
		messages: {
			email: {
				required: "Enter a valid email",
				email: "Enter a valid email"
			}
		}		
	});
	
	$("#frm-quote").validate({
		messages: {
			email: {
				required: "Enter a valid email",
				email: "Enter a valid email"
			}
		}		
	});
	$("#frm-survey").validate({
		messages: {
			email: {
				required: "Enter a valid email",
				email: "Enter a valid email"
			}
		}		
	});
	
	$(function() { 
        $("#plain").change(function(){  
        	if ($(this).val() == "Yes")
        		$("#num-colors, #artwork-provided").hide();
        	else
        		$("#num-colors, #artwork-provided").show();
        }); 
	});
	
	
	$("#q-wpp-multi, #q-micro").hide();
	$('#q-micro, #q-wpp-multi').attr('name', 'q');
    $("#product_line").change(function(){  
    	if ($(this).val() == "Woven Polypropylene Bags")
    	{
    		$("#q-wpp-multi").show();
    		$('#q-wpp-multi').attr('name', 'quantity');
    		$("#q-normal, #q-micro").hide();
    		$('#q-normal, #q-micro').attr('name', 'q');
    	}
   		else if ($(this).val() == "Multiwall Paper Shipping Sack")
    	{
    		$("#q-wpp-multi").show();
    		$('#q-wpp-multi').attr('name', 'quantity');
    		$("#q-normal, #q-micro").hide();
    		$('#q-normal, #q-micro').attr('name', 'q');
    	}
    	else if ($(this).val() == "Microwave Popcorn Packaging")
    	{
    		$("#q-micro").show();
    		$("#q-normal").show();
    		$('#q-normal').attr('name', 'quantity');
    		$("#q-wpp-multi").hide();
    		$('#q-wpp-multi').attr('name', 'q');
    	}
    	else
    	{
    		$("#q-normal").show();
    		$('#q-normal').attr('name', 'quantity');
    		$("#q-micro, #q-wpp-multi").hide();
    		$('#q-micro, #q-wpp-multi').attr('name', 'q');
    	}
    	
    }); 
	
	
	$(function() {  
	    $("p[class^=toggle-link],div[class^=toggle-link]").hide();
	    $('span[class^=link]').click(function() {
			var $this = $(this);
			var x = $this.attr("className");
			$('.toggle-' + x).toggle("fast");
			return false;
		});   
	});

	     
});
