jQuery(function($){
		$(document).ready(function() {
			//Mouseover Fade Effect
			$("img.hover1").hover(
				function() {
				$(this).stop().animate({"opacity": "0"}, "slow");
				},
				function() {
				$(this).stop().animate({"opacity": "1"}, "slow");
			});
		
			//scroll to the top
			$('a.top').click(function(){
				 $('html, body').animate({scrollTop: '0px'}, 900);
				 return false;
			});
			
			//List effect
			if(!$.browser.msie) $("ul li").hover(function() {$(this).siblings().stop().fadeTo(400,0.6);}, function() { $(this).siblings().stop().fadeTo(400,1); });
			
			//Opacity effect
			$("div.smile a,div.cd_moduletitle_logo,div.cdlogin-logout-greeting a, form#cdlogin_form_login fieldset.input p#cdlogin-form-login-submit input#cdlogin_loginbutton,#pricingTableRedMulti,#pricingTableBlueMulti,#pricingTableGreenMulti,#pricingTableOrangeMulti").fadeTo("50", 0.7);
			$("div.smile a,div.cd_moduletitle_logo,div.cdlogin-logout-greeting a, form#cdlogin_form_login fieldset.input p#cdlogin-form-login-submit input#cdlogin_loginbutton,#pricingTableRedMulti,#pricingTableBlueMulti,#pricingTableGreenMulti,#pricingTableOrangeMulti").hover(function(){
			$(this).fadeTo("400", 1.0);
			},function(){
			$(this).fadeTo("400", 0.7);
			});
	
			//Opacity effect Table Price
			$("#pricingTableRedBestValue,#pricingTableBlueBestValue,#pricingTableGreenBestValue,#pricingTableOrangeBestValue").hover(function(){
			$(this).fadeTo("400", 1.0);
			},function(){
			$(this).fadeTo("400", 0.7);
			});
	
			//Opacity effect
			$("div.t3-logo a, a.top, .JVSlide_control").fadeTo("fast", 0.3);
			$("div.t3-logo a, a.top, .JVSlide_control").hover(function(){
				$(this).fadeTo("400", 1.0);
				},function(){
				$(this).fadeTo("400", 0.3);
			});
			
			
			//Full Caption Sliding
			$('.imageBox.fullCaption').hover(function(){
				$(".box", this).stop().animate({top:'0'},{queue:false,duration:400});
			}, function() {
				$(".box", this).stop().animate({top:'100%'},{queue:false,duration:400});
			});
		
			//image fade hover
			$("img.fadehover").hover(
			function() {
			$(this).stop().animate({"opacity": "0.6"}, "slow");
			},
			function() {
			$(this).stop().animate({"opacity": "1"}, "slow");
			});
			
			
			//Slider on slider
			$(".noteDesc, .paging, .imacShadow").show();
			$(".paging a:first").addClass("active");
		
			var imageWidth = $(".window").width();
			var imageSum = $(".imageReel img").size();
			var imageReelWidth = imageWidth * imageSum;
		
			$(".imageReel").css({'width' : imageReelWidth});
			
			//Paging  and Slider Function
			rotate = function(){
				var triggerID = $active.attr("rel") - 1; 
				var image_reelPosition = triggerID * imageWidth; 
		
				$(".paging a").removeClass('active'); 
				$active.addClass('active'); 
			
				$(".imageReel").animate({
					left: -image_reelPosition
				}, 500 );
		
			}; 
		
			//Rotation  and Timing Event
			rotateSwitch = function(){
				play = setInterval(function(){ 
					$active = $('.paging a.active').next(); 
					if ( $active.length === 0) { 
						$active = $('.paging a:first'); 
					}
					rotate();
				}, 7000); 
			};
		
			rotateSwitch(); 
			
			$(".imageReel a").hover(function() {
				clearInterval(play); 
			}, function() {
				rotateSwitch(); 
			});	
		
			$(".paging a").click(function() {
				$active = $(this); 

				clearInterval(play); 
				rotate(); 
				rotateSwitch(); 
				return false; 
			});
			
			// toggle slide left on slider on slider
				slideshowMouseEvent();
				function slideshowMouseEvent(){
					$('.mainView').unbind('mouseenter')
									   .bind('mouseenter',showControls)
									   .andSelf()
									   .unbind('mouseleave')
									   .bind('mouseleave',hideControls);
					}
					
				function showControls(){
					$('#noteDesc, #noteDesc1').stop().animate({'left':'0'},500);
				}
				function hideControls(){
					$('#noteDesc, #noteDesc1').stop().animate({'left':'-3000px'},1500);
				}
				
		});
}); 


