
$(document).ready( function($){
	
	 //fix search box on mac system;
    var ops = window.navigator.userAgent;
  //  var ops = ops.split(";")[2];
    var r = ops.indexOf("Mac");
    if(r>=0){
    	$("#pop_pdf_box  .input2").css('padding', '7px 5px');
    }
							
     var temp_nav_classname = '';
	 $(".nav_menu  li").mouseover(function(){ //navigator js
			temp_nav_classname = $(this).attr("class");
			$(this).attr("class","nav_on");
	});
	 $(".nav_menu  li").mouseout(function(){ //navigator js
			$(this).attr("class",temp_nav_classname);
	});
	 
	 
	 $(".category  li").mouseover(function(){   // Category Tabs in the leftbar
			if( $(this).attr("class") != 'click_on'){
				$(this).css({"background-position":"0 -41px"});
			
		   	    $(this).bind('mouseout', function(){
                  $(this).css({"background-position":"0 0px"});
                });
			}

	});
	
	 	
	 $(".pad_l   .bt_td   a").toggle(	// Downloads Page 
					function () {
						$(this).parent().parent().parent().parent().parent().children(".detail_pdf").show("slow");
						$(this).parent().parent().parent().parent().parent().children(".top_bg").addClass("open_table");
						$(this).parent().prev(".text_1").html("Close");
                        $(this).addClass("open_a");
                    },
                    function () {
						$(this).parent().parent().parent().parent().parent().children(".detail_pdf").hide("slow");
						$(this).parent().parent().parent().parent().parent().children(".top_bg").removeClass("open_table");
						$(this).parent().prev(".text_1").html("Open");
                        $(this).removeClass("open_a");
                        }
                );
	
         // Product Detail PDF 
	 $(".product_detail_downloads .download_bar_title .product_detail_downloads_td_2  a").toggle(	// Downloads Page
					function () {
						$(this).parent().parent().parent().parent().parent().parent().children(".download_content_show").show("slow");
						$(this).parent().parent().parent().parent().parent().parent().children(".download_bar_title").addClass("change_bg");
						$(this).parent().prev(".product_detail_downloads_td_1").html("Close");
                        $(this).addClass("open_a");
                    },
                    function () {
						$(this).parent().parent().parent().parent().parent().parent().children(".download_content_show").hide("slow");
						$(this).parent().parent().parent().parent().parent().parent().children(".download_bar_title").removeClass("change_bg");
						$(this).parent().prev(".product_detail_downloads_td_1").html("Open");
                        $(this).removeClass("open_a");
                        }
                );
	 
	 
	 
	 $(".float_img > a").first().click(function(){  //Product Enquiry
			$("#feedback").toggle("slow");
	});
	 $(".close_feedback ").click(function(){  //Product Enquiry
			$("#feedback").toggle("slow");
	});
	 $(".product_enquiry a img ").click(function(){  //Product Enquiry
			$("#feedback").toggle("slow");
	});

         // pro_detail download extends
    $(".download_extends_img").click(function(){
				$("#download_content_show").toggle("slow");

											   });

    $(".download_extends_img_1").click(function(){
				$("#download_content_show_1").toggle("slow");

											   });

    $(".download_extends_img_2").click(function(){
				$("#download_content_show_2").toggle("slow");

											   });

    $(".download_extends_img_3").click(function(){
				$("#download_content_show_3").toggle("slow");

											   });

    $(".download_extends_img_4").click(function(){
                 		$("#download_content_show_4").toggle("slow");

											   });
	 
$(function(){ //Faq's Page smoothly scrolling

    $('a[href*=#]').click(function() {
    
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') 
        && location.hostname == this.hostname) {
        
            var $target = $(this.hash);
            
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            
            if ($target.length) {
            
                var targetOffset = $target.offset().top;
                
                $('html,body').animate({scrollTop: targetOffset}, 1000);
                    
                return false;
                
            }
            
        }
        
    });
});
	 
});
