$(document).ready(function(){


   $(".business_security_btn").mouseover(function(){
    	$('.business_security_img').fadeIn(500);
 		$('.home_security_img').fadeOut(500);

   });
 

   
    $(".home_security_btn").mouseover(function(){
    	$('.home_security_img').fadeIn(500);
 		$('.business_security_img').fadeOut(500);

   });

	 
	 
	 $(".under_buttons, .top_menu").mouseover(function(){
    	$('.home_security_img').fadeOut(500);
 		$('.business_security_img').fadeOut(500);

   });
   
   $(".request_info_form .close").click(function(){
    	$('.request_info_form').hide();

   });
   
   
   $(".wp-image-665, .request_info").click(function(){
    	$('.request_info_form').show();

   });
   
   
   $(".bus_tab, .home_tab, .mobile_tab").mouseout(function(){
 		$('.bus_tab img, .mobile_tab img, .home_tab img').fadeOut(500);

   });
   
   
   $(".home_tab").mouseover(function(){
    	$('.home_tab img').fadeIn(500);
 		$('.bus_tab img, .mobile_tab img').fadeOut(500);

   });
   
    $(".bus_tab").mouseover(function(){
    	$('.bus_tab img').fadeIn(500);
 		$('.mobile_tab img, .home_tab img').fadeOut(500);

   });
   
   $(".mobile_tab").mouseover(function(){
    	$('.mobile_tab img').fadeIn(500);
 		$('.home_tab img, .bus_tab img').fadeOut(500);

   });
   

    $(".totalSec_btn, .popup_form").live('click', function(){
    	
    	
    	if( $(this).attr('data-form-type') !== undefined  ){
    		var form_type = $(this).attr("data-form-type");
    		$(".buy_pop_copy form").hide();
    		$(".buy_pop_copy form."+form_type).show();
    		$('.bn_pop_wrap').show();
    		
    	}
    	else{
    		$('.bn_pop_wrap').show();
    	}

   });
   
   $(".close_bn_pop").live('click', function(){
    	$('.bn_pop_wrap').hide();
   });
   
   $(".bn_pop_form input:radio").live('click', function(){
   		var popup_link = $(this).parents("form").find(".buy_pop_link");
   		var data_url = $(this).attr("data-url");
   		$(popup_link).attr("href", data_url );   		
   });
   
   $(".totalSec_btn").live('click', function(){
   		itrvl = clearInterval(itrvl);   	
   });
   
   $(".close_bn_pop").live('click', function(){
   		if(  $(".rot_banners").length > 0 ){
   			itrvl = setInterval("nextSlide()", 6000);	
   		}   		
   });
   
   $(".tab_top li").live('click', function(){
   		var li_class = $(this).attr('class');
   		
   		$(".tab_top li").css("background-position", "0 -41px").css("color", "#666666");
   		$(".tab_top li").removeAttr("clicked");
   		
   		$(this).css("background-position", "0 0").css("color", "#FFFFFF");
   		$(this).attr("clicked",true);
   		
   		$("div.tab_mid div").hide();
   		$("div.tab_mid div."+li_class).show();
   		
   		$("div.tab_top li").unbind("mouseover").unbind("mouseout");
   		
   		$("div.tab_top li").filter(function(idx){ return ($(this).attr("clicked") == undefined) }).mouseover(function(){
			$(this).css("background-position", "0 0").css("cursor", "pointer").css("color", "#FFFFFF");   					
		}).mouseout( function(){
			$(this).css("background-position", "0 -41px").css("cursor", "pointer").css("color", "#666666");   					
		});
   		
   });
   
   $(".tab_top .tab1_content").trigger('click');
   
    $(".readLess").hide();
    $(".readLess, .readMore").css("cursor", "pointer");
   
   $(".readMore").live('click', function(){
   		$("div.tab4_content ul").css("height", "auto");
   		$(".readLess").show();
   		$(".readMore").hide();
   })
   
   $(".readLess").live('click', function(){
   		$("div.tab4_content ul").css("height", "405px");
   		$(".readMore").show();
   		$(".readLess").hide();
   })
   
   
   //code push urls to Google analytics
   pageTracker = _gat._getTracker("UA-21196803-1");
   product_name = "";
   $("a.outbound_trial").click(function(){
   		if( $(this).attr("data-productname") ) {
   			product_name =  $(this).attr("data-productname")+'/';
   		}
   		pageTracker._trackPageview('/outbound/'+ $(this).attr('href')+'/trial/'+product_name);
   });
   
   $("a.outbound_buy").click(function(){
   		if( $(this).attr("data-productname") ) {
   			product_name =  $(this).attr("data-productname")+'/';
   		}
   		pageTracker._trackPageview('/outbound/'+ $(this).attr('href')+'/buy/'+product_name);
   });

  	 
 });
 

