$(document).ready(function() {

$("#googlerss ul li a").attr("target","_blank");


$(".g-arrow, .q-arrow, .a-arrow").prev().hover(

  function() {

    $(this).next().attr("src","/wp-content/themes/ins/images/nav-arrow-up.png");

  }, 

  function() {

     $(this).next().attr("src","/wp-content/themes/ins/images/nav-arrow-down.png");

});



$(".dropdown").hover(

  function() {

    $(this).prev().attr("src","/wp-content/themes/ins/images/nav-arrow-up.png");

  }, 

  function() {

     $(this).prev().attr("src","/wp-content/themes/ins/images/nav-arrow-down.png");

});



$(".quote-btn").hover(

  function() {

    $(this).attr("src","/wp-content/themes/ins/images/get-quote-btn-hover.jpg");

  }, 

  function() {

     $(this).attr("src","/wp-content/themes/ins/images/get-quote-btn.jpg");

});



$(".rssbtn").hover(function() {

		$(this).stop(true)

		.animate({"bottom": "-4px"}, 100)

		.animate({"bottom": "-13px"}, 100)

		.animate({"bottom": "-8px"}, 100)

		.animate({"bottom": "-10px"}, 100)

		.css("display","block")

	}, function() {

		$(this).stop(true)

		.animate({"bottom": "-=5px"})

	});



$(".feacontent").hide(); //Hide all content

	$("ul#featabs li:first").addClass("active1").show(); //Activate first tab

	$("#featabscontent div:first").show(); //Show first tab content

	

	//On Click Event

	$("ul#featabs li#tab1").click(function() {

		$("ul#featabs li").removeClass(); //Remove any "active" class

		$(this).addClass("active1"); //Add "active" class to selected tab

		$("#featabscontent div.feacontent").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content

		$(activeTab).fadeIn(); //Fade in the active content

		return false;

	});

	

	$("ul#featabs li#tab2").click(function() {

		$("ul#featabs li").removeClass(); //Remove any "active" class

		$(this).addClass("active2"); //Add "active" class to selected tab

		$("#featabscontent div.feacontent").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content

		$(activeTab).fadeIn(); //Fade in the active content

		return false;

	});

	

		$("ul#featabs li#tab3").click(function() {

		$("ul#featabs li").removeClass(); //Remove any "active" class

		$(this).addClass("active3"); //Add "active" class to selected tab

		$("#featabscontent div.feacontent").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content

		$(activeTab).fadeIn(); //Fade in the active content

		return false;

	});

		

			$("ul#featabs li#tab4").click(function() {

		$("ul#featabs li").removeClass(); //Remove any "active" class

		$(this).addClass("active4"); //Add "active" class to selected tab

		$("#featabscontent div.feacontent").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content

		$(activeTab).fadeIn(); //Fade in the active content

		return false;

	});

			

				$("ul#featabs li#tab5").click(function() {

		$("ul#featabs li").removeClass(); //Remove any "active" class

		$(this).addClass("active5"); //Add "active" class to selected tab

		$("#featabscontent div.feacontent").hide(); //Hide all tab content

		var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content

		$(activeTab).fadeIn(); //Fade in the active content

		return false;

	});

				

$(".psbtn").click(function(){

		$(".popupb").hide(900);

		var actives = $(this).parent().attr("href"); //Find the rel attribute value to identify the active tab + content

		$(actives).fadeIn(); //Fade in the active content

return false;

});



$(".closebtn").click(function(){

		 $(".popupb").hide(200);

});



$(".psbtn").hover(function(){ $(this).attr("src","/wp-content/themes/ins/images/point2.png");		 

}, function() { $(this).attr("src","/wp-content/themes/ins/images/point.png");

});



$("img.free").everyTime(10, function(){						 

             $(this).animate({opacity:"0.3"}, 100).animate({opacity:"1"}, 100);	

});





$(".howitworks").hide();

$("#sidebar .how-i").parent().click(function(){

		$(this).next().slideToggle("slow");

	});



$("#sidebar .hideit").click(function(){

		$(this).parent().fadeOut(500),$(this).parent().next().fadeOut(500) ;

	});





$("#showsite").hide();

$("#showothers img").click(function(){

		$(this).parent().next().stop(true,true).slideToggle("slow");

	});

$("#showothers img").toggle(function(){

        $(this).attr("src","/wp-content/themes/ins/images/hideothers.png")}, function() {$(this).attr("src","/wp-content/themes/ins/images/showothers.png")});





$(function(){

    $('#bimagec img:gt(0)').hide();

    setInterval(function(){

      $('#bimagec :first-child').fadeOut()

         .next('img').fadeIn()

         .end().appendTo('#bimagec');}, 3800);

});



$(".qfield1").focus();

$.preloadCssImages();


});
