if (document.documentElement.clientWidth >= 781) {

	jQuery(document).ready(function($){
	
		$(".theme").hover(
	      function () {
	        $(this).find('img').stop('true','true').animate({'top':'7px', 'opacity':'0'}, 300, "easeOutQuad").fadeOut(1);
	        $(this).find('ul').stop('true','true').css({'top':'-20px', 'opacity':'0'}).animate({'top':'0', 'opacity':'1'}, 800, "easeOutElastic");
	      },
	      function () {
	        $(this).find('img').stop('true','true').show().css({'top':'-20px'}).animate({'top':'0','opacity':'1'}, 800, "easeOutElastic");
	        $(this).find('ul').stop('true','true').animate({'top':'7px', 'opacity':'0'}, 100);
	      });
	    
	    $("#email").click(function() {
	        $("#versionContent").css({'display':'block'});
	        $("#versionBox").delay(300).fadeIn(800);
	        
	        $('#versionContent').click(function() {
	            $(this).css({'display':'none'});
	            $("#versionBox").css({'display':'none'});
	        });             
	        $('#version').click(function(event){
	            event.stopPropagation();
	        });
	    });
	                
	    $(function() {
	      enable_cb();
	      $("#group1").click(enable_cb);
	    });
	    
	    function enable_cb() {
	      if (this.checked) {
	        $("input.group1").removeAttr("disabled");
	      } else {
	        $("input.group1").attr("disabled", true);
	      }
	    }
	    
	        $(function() {
	          enable_cb();
	          $("#group1").click(enable_cb);
	        });
	        
	        function enable_cb() {
	          if (this.checked) {
	            $("#contact-form").slideDown();
	          } else {
	            $("#contact-form").slideUp();
	          }
	        }
	                
	                
	        $('#submit-form').click(function(){
	        
	        var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	        var names 				 = $('#contact-form [name="contact-names"]').val();	 
	        var email_address = $('#contact-form [name="contact-email"]').val();
	        var comment			 = $.trim($('#contact-form .contact-commnent').val());
	        var data_html ='' ;
	       
	       
				if(names == ""){
					 $('.name-required').html('Required.');
				}else{
					 $('.name-required').html('');
				}
				if(email_address == ""){
					 $('.email-required').html('Required.');
				}else if(reg.test(email_address) == false){
					 $('.email-required').html('Invalid Email Address.');
				}else{
					 $('.email-required').html('');
				}
				
				if(comment == ""){
					 $('.comment-required').html('Required.');
				}else{
					 $('.comment-required').html('');
				}
	     				
	 		if(comment != "" && names != "" && reg.test(email_address) != false){
	 		
	 			data_html = "names="+ names + "&comment=" + comment + "&email_address="+ email_address;
	 			
	 			//alert(data_html);
	 			
	 		  $.ajax({
					  type: 'POST',
					  url: '../../php/contact-send.php',
					  data: data_html,
					  success: function(msg){
					  	if (msg == 'sent'){
					 			$('#success').html('Message sent!') 	;
					 			$('#contact-form [name="contact-names"]').val('');	 
							  $('#contact-form [name="contact-email"]').val('');
	    					$('#contact-form .contact-commnent').val('');
					 			
					 		}else{
					 			$('#success').html('Mail Error. Please Try Again.!') 	;	
					 		}
					  }
				});
	 	  }
		 	return false;
	 	})
	    
		sublimevideo.load()
		$('.manual').live('click',function(){
	       
			var href = $(this).attr('href');
			
			// Hide Footer
	
		    $('footer').hide();
	
			if ($('#ajax').is(':visible')) {
				$('#ajax').hide();
			}
			
			$('#ajax').each(function(){
				$('#ajax').load('../../manuals/index.html #'+href,function(){
				
				    // Price
				    
				    var buy = $(".buynow")
				    
				    var price = buy.text();
	                
	                buy.hover(
	                  function () {
	                    $(this).text(function(){return 'Purchase';});
	                  }, 
	                  function () {
	                    $(this).text(function() {
	                        return price;
	                    });
	                  }
	                );
				    
				    // Ready Subime Video
				    
				    sublimevideo.prepare()
				    
				    // Create Accordion
		    
				    $('.acc .con').hide();
	    			$('.acc h3').click(function(){
	    			  if ($(this).hasClass('selected')) {
	    			       $(this).removeClass('selected');
	    			       $(this).next().hide();
	    			  } else {
	    			       $('.acc h3').removeClass('selected');
	    			       $(this).addClass('selected');
	    			       $('.acc .con').hide();
	    			       $(this).next().show();
	    			  }
	    			  return false;
	    			});
	    			
	    			$('#themeWrap').stop().fadeOut().animate({opacity:0},0,function(){
	                    $('#ajax').css('z-index','2').fadeIn('slow').prepend('<div id="back">Back</div>');
	                    
	                    $('#back').click(function() {
					        sublimevideo.unprepare();
	                        $('#ajax').stop().css('z-index','0').fadeOut(300, function(){
	                            $('#themeWrap').show().animate({top:'0',opacity:1});
	                        });
	                    });
	                });
			            			
				});
			});
			return true;
		});	
	});
}
