// JavaScript Document

$(document).ready(function() {
	
		// TRAN IMAGES
		
		/*$('*').supersleight({shim: 'images/spacer.gif'});*/

	
		// RANDOM BANNERS
		
		$('.shuffle').randomImage({path: 'interface/'});
		
		
		// MODALS
		
		$("a[rel='model']").colorbox();
		$(".modelVid").colorbox({iframe:true, innerWidth:560, innerHeight:349});
		$(".modelDiv").colorbox({width:"650px", height:"450px", inline:true});
		$(".modelDiv.tip1").colorbox({href:"#ION-details1"});
		$(".modelDiv.tip2").colorbox({href:"#ION-details2"});
		$(".modelDiv.tip3").colorbox({href:"#ION-details3"});
		$(".modelDiv.tip4").colorbox({href:"#ION-details4"});
		$(".modelDiv.tip5").colorbox({href:"#ION-details5"});
		$(".modelDiv.tip6").colorbox({href:"#ION-details6"});
		$(".modelDiv.tip7").colorbox({href:"#ION-details7"});
		$(".modelDiv.GTIdetail").colorbox({href:"#GTIdetails"});
		

		$("#click").click(function(){ 
		$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"});
		return false;
		});
				
					
		// QTIP
		
		$('.tip1').qtip({
	   content: 'Sealed Water Pathway',
	   position: {
			  type: 'absolute',
			  adjust: { x: 0, y: -50, resize:true },
			  target: 'mouse'
			}
		});
		$('.tip2').qtip({
	   content: 'EZ Change Filter',
	   position: {
			  type: 'absolute',
			  adjust: { x: 0, y: -50, resize:true },
			  target: 'mouse'
			}
		});
		$('.tip3').qtip({
	   content: 'SleepMode',
	   position: {
			  type: 'absolute',
			  adjust: { x: 0, y: -50, resize:true },
			  target: 'mouse'
			}
		});
		$('.tip4').qtip({
	   content: 'PureAlert',
	   position: {
			  type: 'absolute',
			  adjust: { x: 0, y: -50, resize:true },
			  target: 'mouse'
			}
		});
		$('.tip5').qtip({
	   content: 'SaniTouch',
	   position: {
			  type: 'absolute',
			  adjust: { x: 0, y: -50, resize:true },
			  target: 'mouse'
			}
		});
		$('.tip6').qtip({
	   content: 'InstaChill/RapidHot',
	   position: {
			  type: 'absolute',
			  adjust: { x: 0, y: -50, resize:true },
			  target: 'mouse'
			}
		});
		$('.tip7').qtip({
	   content: 'Base Cabinets',
	   position: {
			  type: 'absolute',
			  adjust: { x: 0, y: -50, resize:true },
			  target: 'mouse'
			}
		});
		
		
		
		// VALIDATE FORM
			
		$("#contactform").validate({
		rules: {
			contactname: "required",
			email: "required"
		},
		messages: {
			contactname: "Please enter your name",
			email: "Please enter a valid email address"
		}
		});
		

});
