// JavaScript Document


		$(function() {   
		
			var theWindow        = $(window),
			    $bg              = $("#bg"),
			    aspectRatio      = $bg.width() / $bg.height();
			    			    		
			function resizeBg() {
				
				if ( (theWindow.width() / theWindow.height()) < aspectRatio ) {
				    $bg
				    	.removeClass()
				    	.addClass('bgheight');
				} else {
				    $bg
				    	.removeClass()
				    	.addClass('bgwidth');
				}
							
			}
			                   			
			theWindow.resize(function() {
				resizeBg();
			}).trigger("resize");
		
		});
		
		
		
		
				$(document).ready(function(){
										   
										   $("#productOne img").css("opacity","0");
										   
										   $("#productOne img").stop().animate({opacity: 1.0}, 20000);
										   
										     $("#productTwo img").css("opacity","0");
										   
										   $("#productTwo img").stop().animate({opacity: 1.0}, 20000);
										   
										     $("#productThree img").css("opacity","0");
										   
										   $("#productThree img").stop().animate({opacity: 1.0}, 20000);
										   
										       $("#productFour img").css("opacity","0");
										   
										   $("#productFour img").stop().animate({opacity: 1.0}, 20000);
	
		
		
		});
				
				$(function(){
	function moveFloatMenu() {
		var menuOffset = menuYloc.top + $(this).scrollTop() + "px";
		$('#floatMenu').animate({top:menuOffset},{duration:500,queue:false});
	}
 
	menuYloc = $('#floatMenu').offset();
 
	$(window).scroll(moveFloatMenu);
 
	moveFloatMenu();
});
				
			

$(document).ready(function() {

    $('.slideshow').cycle({

		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...

	});

});

	$.fx.speeds._default = 1000;
	$(function() {
		$( "#dialog" ).dialog({
			autoOpen: false,
			show: "blind",
			hide: "explode",
			width: 470,
			modal: true
		});

		$( "#opener" ).click(function() {
			$( "#dialog" ).dialog( "open" );
			return false;
		});
	});


				
				  
