// JavaScript Document


jQuery(function($)
{
	
	$("#formwhois:input").change(function() {
	if (this.value) {
	var whoisURL = this.value + "#whois";
	document.location.href=whoisURL;
	//document.location.href="police.html";
	}
	}); 
	
	/*
	imgFldr = 'images/nameofthesubfolder/';
	$("input[type='radio']").click(function() {
   	$('#flashimg').attr('src', imgFldr+this.value).attr('alt', 'newattribute');
	});
	*/
	
	
});

jQuery(function($)
{
	
	
	
	$("#formpattern:input").change
		(
    function()
		{
			/*function fadeOut(clonedBens) {
			$('#thebenefits').animate({'opacity' : 0},{duration: 500, queue: false,
			complete: function()
			{
			$('#thebenefits > *').remove();
			fadeIn(clonedBens);
			}
			});
			};
			
			function fadeIn(newBens) {
			$('#thebenefits').append(newBens.show());
			$('#thebenefits').show().animate({'opacity' : 1},{duration: 350, queue: false});
			};*/
			
			
			var patternfolder = 'images\/patterns\/';
			var filename = $("#formpattern:input").attr('value').split(',')[1];
			var pattern =  $("#formpattern:input").attr('value').split(',')[0];
			var cloneset = $('#pattern_' + pattern).html();
			//fadeOut(cloneset);
			
			
			
			
			$('#flashimg').attr('src', patternfolder+filename);
			$('#thebenefits').replaceWith('<div id=\"thebenefits\">' + cloneset + '</div>');

			//alert('change flash pattern'); 
	//alert($('#formpattern:input').attr('value'));
	//$('#flashimg').attr('src', patternfolder+filename);
		}
	);
	
	
});


jQuery(function($)
{
	
	$("form#vieworder").submit
		(
    function()
		{
			
			alert('vieworder')
			
			
		}
	);
	
	
});



jQuery(function($)
{
	
	// IE6 png fix
	// apply to all png images 
	$('img[src$=.png]').ifixpng();	
	
	//corner fixer for div
	$('#welcome_dept').corner();
	
});


jQuery(function($)
{
	
	jQuery('#mycarousel').jcarousel();
	
	
});