/*global jQuery:false */



jQuery(document).ready(function($){

"use strict";
	
	var checkExist = setInterval(function() {
	   if ($('.sentient-layerslider-numbers-container .ls-wp-container .ls-nav-next').length) {
			$(".sentient-layerslider-numbers-container .ls-wp-container").each(function() {
				var sentientSliderCount = $(this).find(".ls-inner").children().length;
				sentientSliderCount = sentientSliderCount ;

				var sentientGetCurrentSlide = $(this).find(".ls-inner .ls-active").index() + 1;
				if(sentientGetCurrentSlide == parseInt(0)){sentientGetCurrentSlide = "1";}
				
				$(this).find(".ls-nav-next").append("<span class='sentient-layerslider-navigation-wrapper'><span class='sentient-layerslider-numbers'><span class='sentient-layerslider-current'>" + sentientGetCurrentSlide + "</span><span class='sentient-layerslider-sperator'> </span><span class='sentient-layerslider-total'>" + sentientSliderCount + "</span></span><span class='sentient-layerslider-small-border'></span><span class='sentient-layerslider-nav-icon'><i class='icon-right-open'></i></span></span>");
				$(this).find(".ls-nav-prev").append("<span class='sentient-layerslider-navigation-wrapper'><span class='sentient-layerslider-nav-icon'><i class='icon-left-open'></i></span><span class='sentient-layerslider-small-border'></span><span class='sentient-layerslider-numbers'><span class='sentient-layerslider-current'>" + sentientGetCurrentSlide + "</span><span class='sentient-layerslider-sperator'> </span><span class='sentient-layerslider-total'>" + sentientSliderCount + "</span></span></span>");

			});	
			clearInterval(checkExist);
	   }
	}, 1000); 

	$(".sentient-layerslider-numbers-container .ls-wp-container .ls-nav-next , .sentient-layerslider-numbers-container .ls-wp-container .ls-nav-prev").mouseover(function() {
		$(this).addClass("sentient-layerslider-numbers-container-hover");
	  }).mouseout(function(){	
		$(this).removeClass("sentient-layerslider-numbers-container-hover");
	});	
	
	
	
	$(window).load(function(){
	

	
	  $('.sentient-layerslider-numbers-container .ls-wp-container .ls-nav-next').live('click', function(e){
			var sentientSliderCount = $(this).parent().find(".ls-inner").children().length;
			sentientSliderCount = sentientSliderCount;
			
			var sentientgetnumber = $(this).parent().find(".ls-inner .ls-active").index() + 1;
			if(parseInt(sentientgetnumber) == parseInt(sentientSliderCount)){ sentientgetnumber = '1' ; }
			$(".sentient-layerslider-current").text(sentientgetnumber);
			return false;
		});
		
		
		$('.sentient-layerslider-numbers-container .ls-wp-container .ls-nav-prev').live('click', function(e){
			var sentientSliderCount = $(this).parent().find(".ls-inner").children().length;
			sentientSliderCount = sentientSliderCount;
			
			var sentientgetnumber = $(this).parent().find(".ls-inner .ls-active").index() - 1;
			if(parseInt(sentientgetnumber) == parseInt(0)){ sentientgetnumber = sentientSliderCount - 1 ; }
			$(".sentient-layerslider-current").text(sentientgetnumber);
			return false;
		});
	

	});	

	
	
	
	$("a.add_to_cart_button").live("click",function() {
		$("html, body").animate({ scrollTop: 0 },"slow");
		$(".sentient-header-cart-items-container").addClass("sentient-header-cart-items-container-show");
		setTimeout(function() {
			$(".sentient-header-cart-items-container").removeClass("sentient-header-cart-items-container-show");
		}, 5000);
		return false;
	});		
	
	$(window).scroll(function () {
		var GetTopHeaderHeight = $('.sentient-header-top-container').height();
		var GetMiddleHeaderHeight = $('.container-wide').height();
		var GetBottomHeaderHeight = $('.sentient-header-bottom-container').height();
		
		var GetTotalHeaderHeight = GetTopHeaderHeight + GetMiddleHeaderHeight + GetBottomHeaderHeight;
		
		if ($(this).scrollTop() > GetTotalHeaderHeight) {

			$('.container-wide.sentient-sticky').addClass('header-container-wide-sticky');
			$('.sentient-header-bottom-container.sentient-sticky').addClass('header-container-wide-sticky');			
		} else {
			$('.container-wide').removeClass('header-container-wide-sticky');
			$('.sentient-header-bottom-container').removeClass('header-container-wide-sticky');			
		}
	});		
	
	
	
	var getprofmenuitems = $("#cssmenu ul:first").children().length;
	
	$("#cssmenu ul:first").addClass("prof-cssmenu-regular");
	
	$(".sentient-header-search-icon").live("click",function() {
		if($(".sentient-header-search-input-container").hasClass("sentient-header-search-input-container-show")){
			$(".sentient-header-search-input-container").removeClass("sentient-header-search-input-container-show");
		}
		else{
			$(".sentient-header-search-input-container").addClass("sentient-header-search-input-container-show");
		}
	});				
	
	$('html').click(function(e)
	{
		 var target = e.target;

		 if (!$(target).is('.sentient-header-search-input-container input , #searchsubmit'))
		 {
				$('.sentient-header-search-input-container').removeClass('sentient-header-search-input-container-show');
		 }
	});	
	
	
	$("#cssmenu li.sentient-megamenu-container").each(function() {
		var logoallposition = $( ".logo-container" ).offset();
		var currentmenuposition = $(this).find("ul:first").offset();
		var logoxposition = currentmenuposition.left - logoallposition.left - 14;		
		
		$(this).find("ul:first").addClass("sentient-megamenu-added-list-container").wrapInner( "<div class='sentient-megamenu-added-container'></div>" );
				
		/*$(this).find("ul:first").css({ "left": "-" + logoxposition + "px"});	*/
	});	
	
	
	

	
	$("#cssmenu div ul.sentient-megamenu-added-list-container").each(function() {
		var MenuWidth = $( ".logo-container" ).width();
		var MenuPosition = $( ".logo-container" ).offset();
		var AddedPosition = $(this).offset();
		/*var result = AddedPosition.left - MenuPosition.left + 20;*/
		var result = AddedPosition.left - MenuPosition.left - 14;
				
		$(this).css({ "width": MenuWidth + "px"});
		$(this).css({ "left": "-" + result + "px"});
	});
	
	$(".sentient-header-bottom-menu #cssmenu div ul.sentient-megamenu-added-list-container").each(function() {
		var logoallposition = $( ".logo-container" ).offset();
		var currentmenuposition = $(this).offset();
		var logoxposition = currentmenuposition.left - logoallposition.left - 16 - 5 + 43;		


		$(this).css({ "left": "-" + logoxposition + "px"});
			
	});	
	
	$( window ).resize(function() {
		$("#cssmenu div ul.sentient-megamenu-added-list-container").each(function() {
			var MenuWidth = $( ".logo-container" ).width();
			$(this).css({ "left": "auto"});
			var MenuPosition = $(".logo-container").offset();
			var AddedPosition = $(this).offset();
			var result = AddedPosition.left - MenuPosition.left;
					
			$(this).css({ "width": MenuWidth + "px"});
			$(this).css({ "left": "-" + result + "px"});
		});	
		
	});

	
	$("#cssmenu .sentient-megamenu-added-container .sentient-megamenu-title-container").each(function() {
		$(this).replaceWith($("<li class='sentient-megamenu-title-added-container'>" + $(this).html() + "</li>"));
	});	
	
	
	$("#cssmenu li.sentient-megamenu-container , .sentient-megamenu-added-container").mouseover(function() {
		$(this).find( ".sentient-megamenu-added-container" ).addClass("sentient-megamenu-added-container-show");
	}).mouseout(function(){
		$(this).find( ".sentient-megamenu-added-container" ).removeClass("sentient-megamenu-added-container-show");
	});

	
	$(".sentient-video-tutorial-container.sentient-video-tutorial-container-styletwo").mouseover(function() {
		$(this).addClass("sentient-video-tutorial-container-styletwo-show");
	}).mouseout(function(){
		$(this).removeClass("sentient-video-tutorial-container-styletwo-show");
	});

	
	$(".mobileMenu-icon").live("click",function() {
		$(this).addClass("mobileMenu-icon-hide");
		$("#mobileMenu").addClass("mobile-menu-show");
		$("#MobileMenuContainer").addClass("mobile-menu-container-show");
		$("#SentientMainContentContainer").addClass("sentient-main-content-container-show");
		$(".sentient-header-cart-container").addClass("sentient-header-cart-container-hide");
		$(".container-wide").addClass("header-container-wide-disable-sticky");
		
	});
	
	$(".mobileMenu-icon-close").live("click",function() {
		$(".mobileMenu-icon").removeClass("mobileMenu-icon-hide");
		$("#mobileMenu").removeClass("mobile-menu-show");
		$("#MobileMenuContainer").removeClass("mobile-menu-container-show");
		$("#SentientMainContentContainer").removeClass("sentient-main-content-container-show");
		$(".sentient-header-cart-container").removeClass("sentient-header-cart-container-hide");
		$(".container-wide").removeClass("header-container-wide-disable-sticky");		
	});	
	
	$(".sentient-header-top-info-languages a").mouseover(function() {
		$(".sentient-header-top-info-languages .sentient-menu-arrow").addClass("sentient-menu-languages-arrow");
	}).mouseout(function(){
		$(".sentient-header-top-info-languages .sentient-menu-arrow" ).removeClass("sentient-menu-languages-arrow");
	});	
 
	
	
	$(".sentient-header-top-social-divider span").mouseover(function() {
		$(this).parent().find( ".sentient-header-top-popup-container" ).addClass("sentient-header-top-popup-container-show");
	}).mouseout(function(){
		$(this).parent().find( ".sentient-header-top-popup-container" ).removeClass("sentient-header-top-popup-container-show");
	});	
	
	/*$("#cssmenu li.sentient-megamenu-container").find("ul:first").addClass("sentient-megamenu-added-list-container").wrapInner( "<div class='sentient-megamenu-added-container'></div>" );*/
	
	if(getprofmenuitems > 5 && getprofmenuitems < 11){
		$("#cssmenu ul:first").addClass("prof-cssmenu-medium");
	} else {
		$("#cssmenu ul:first").addClass("prof-cssmenu-large");
	}

	
	$("#hot-item-close").live("click",function() {
		$("#hot-item-value").removeClass("hot-item-value-display").addClass("hot-item-value-hide");	
	});	

	

	
	$("#cssmenu div ul.menu li").mouseover(function() {
		$(this).find( "a:first" ).addClass("sentient-menu-arrow-hover");
		$(this).find( ".sentient-menu-arrow" ).addClass("sentient-menu-arrow-hover");
	}).mouseout(function(){
		$(this).find( "a:first" ).removeClass("sentient-menu-arrow-hover");
		$(this).find( ".sentient-menu-arrow" ).removeClass("sentient-menu-arrow-hover");	
	});		
	
	$("#cssmenu div ul li").mouseover(function() {
		$(this).parent().addClass("make-it-visible-children");
	}).mouseout(function(){
		$(this).parent().removeClass("make-it-visible-children");
	});	

	
	$('.blogs-flexslider').flexslider({
		animation: "slide",
		slideshow: false,
		itemWidth: 544,
		directionNav: true,
		animationLoop: false
	});	
	
	$('.recentpost-slider-mini').flexslider({
		animation: "slide",
		slideshow: false,
		//itemWidth: 214,
		itemWidth: 217,
		directionNav: true,
		animationLoop: false
	});

	$('.recentpost-slider-mini-mobile').flexslider({
		animation: "slide",
		slideshow: false,
		itemWidth: 900,
		directionNav: false,
		animationLoop: false
	});	
	
	$('.div-top').hide();
	
	$(window).scroll(function () {
		if ($(this).scrollTop() > 100) {
			$('.div-top').fadeIn();
		} else {
			$('.div-top').fadeOut();
		}
	});

	
	$('.top-header-collapse-inactive').live("click",function() {
		$(this).parents('.top-header-container-collapse').animate({
			marginTop: "0px",
		},300);
		$(this).html("-");
		$(this).removeClass('top-header-collapse-inactive');
		$(this).addClass('top-header-collapse-active');
		return false;
	});
	
	$('.top-header-collapse-active').live("click",function() {
		$(this).parents('.top-header-container-collapse').animate({
			marginTop: "-45px",
		},300);
		$(this).html("+");		
		$(this).removeClass('top-header-collapse-active');
		$(this).addClass('top-header-collapse-inactive');
		return false;		
	});
	
	
	$('.TopHeaderInnerContainerClick-inactive').live("click",function() {
		$(this).parents('.top-header-container').animate({
			marginTop: "0px",
		},300);
		$(this).html("-");
		$(this).removeClass('TopHeaderInnerContainerClick-inactive');
		$(this).addClass('TopHeaderInnerContainerClick-active');
		return false;
	});	
	
	$('.TopHeaderInnerContainerClick-active').live("click",function() {
		$(this).parents('.top-header-container').animate({
			marginTop: "-40px",
		},300);
		$(this).html("+");
		$(this).removeClass('TopHeaderInnerContainerClick-active');
		$(this).addClass('TopHeaderInnerContainerClick-inactive');
		return false;
	});		

	$(".span-hovering").mouseover(function() {
		$(this).children().find('span.block-icon').addClass("animate-span");
	}).mouseout(function(){
		$(this).children().find('span.block-icon').removeClass("animate-span");
	});	
	
	$(".home-main-col").mouseover(function() {
		$(this).addClass("home-main-col-hover");
	}).mouseout(function(){
		$(this).removeClass("home-main-col-hover");
	});		

	$(".alert-box-close").click(function() {	
		$(this).parent().fadeOut().remove();
	});

	$(".div-top").click(function() {
		$("html, body").animate({ scrollTop: 0 },"slow");
		return false;
	});	
	
	
	$(".recentpostcontainer").mouseover(function() {
		$(this).find(".recentpostcontainer-data").addClass("recentpostcontainer-data-hover");
	  }).mouseout(function(){
		$(this).find(".recentpostcontainer-data").removeClass("recentpostcontainer-data-hover");
	});	
	
	$(".footer-blog-main-container img").mouseover(function() {
		$(this).parent().parent().find(".footer-blog-container-title").addClass("footer-blog-container-title-show");
	  }).mouseout(function(){
		$(this).parent().parent().find(".footer-blog-container-title").removeClass("footer-blog-container-title-show");
	});	
	

	$(".ls-layer h1, .ls-layer h2, .ls-layer h3, .ls-layer h4, .ls-layer h5, .ls-layer h6").addClass("layerslider-heading");
	
	$(".homepage-container-design li.portfolio-item .thumb").mouseover(function() {
		$(this).find(".portfolio-internal-icon").addClass("portfolio-internal-icon-hover");
		$(this).find(".portfolio-internal-thumb").addClass("portfolio-internal-thumb-hover");
		$(this).find(".portfolio-internal-displayed-title").addClass("portfolio-internal-displayed-title-hover");
	  }).mouseout(function(){
		$(this).find(".portfolio-internal-icon").removeClass("portfolio-internal-icon-hover");
		$(this).find(".portfolio-internal-thumb").removeClass("portfolio-internal-thumb-hover");
		$(this).find(".portfolio-internal-displayed-title").removeClass("portfolio-internal-displayed-title-hover");		
	});
	
	$(".portfolio-four-column.portfolio-four-column-home li.portfolio-item, .portfolio-wrapper-internal-page li.portfolio-item").mouseover(function() {
		$(this).find(".thumb-content").addClass("thumb-content-hover");
		$(this).addClass("portfolio-item-internal-hover");
		$(this).find(".portfolio-internal-hidden-title-icons").addClass("portfolio-internal-hidden-title-icons-hover");
		$(this).find(".portfolio-internal-icon").addClass("portfolio-internal-icon-hover");
		$(this).find(".portfolio-internal-thumb").addClass("portfolio-internal-thumb-hover");
	  }).mouseout(function(){
		$(this).find(".thumb-content").removeClass("thumb-content-hover");
		$(this).removeClass("portfolio-item-internal-hover");
		$(this).find(".portfolio-internal-hidden-title-icons-hover").removeClass("portfolio-internal-hidden-title-icons-hover");
		$(this).find(".portfolio-internal-icon").removeClass("portfolio-internal-icon-hover");
		$(this).find(".portfolio-internal-thumb").removeClass("portfolio-internal-thumb-hover");		
	});
	
	$(".blog-middle-container .post .blog-modern-left-box-thumb").mouseover(function() {
		/*$(this).find(".blog-modern-thumb-text").addClass("blog-modern-thumb-text-hover");*/
		$(this).addClass("blog-modern-left-box-thumb-hover");
	  }).mouseout(function(){
		/*$(this).find(".blog-modern-thumb-text").removeClass("blog-modern-thumb-text-hover");*/
		$(this).removeClass("blog-modern-left-box-thumb-hover");	  
	});	
	

	$(".blog-image-container").mouseover(function() {
		$(this).find(".blog-date-icon-container").addClass("blog-read-icons-container-hover");
	  }).mouseout(function(){
		$(this).find(".blog-date-icon-container").removeClass("blog-read-icons-container-hover");		
	});

	$(".blog-thumb-date-container img").mouseover(function() {
		$(this).addClass("img-blog-hover");
	  }).mouseout(function(){
		$(this).removeClass("img-blog-hover");		
	});
	
	$(".blog-anchor").mouseover(function() {
		$(this).parent().parent().parent().find("img.wp-post-image").addClass("img-blog-hover");
	  }).mouseout(function(){
		$(this).parent().parent().parent().find("img.wp-post-image").removeClass("img-blog-hover");	
	});	
	
	$(".blog-icon-container , .blog-date-container").mouseover(function() {
		$(this).parent().parent().find("img.wp-post-image").addClass("img-blog-hover");
	  }).mouseout(function(){
		$(this).parent().parent().find("img.wp-post-image").removeClass("img-blog-hover");	
	});	

	$(".blog-button").mouseover(function() {
		$(this).find(".blog-button-content").addClass("blog-button-content-hover");
	  }).mouseout(function(){
		$(this).find(".blog-button-content").removeClass("blog-button-content-hover");
	});
 	
	
	$(".home-blogs-modern-item img.wp-post-image , .home-blogs-modern-item iframe , .home-blogs-modern-item a.wp-post-image-link").mouseover(function() {
		$(this).parent().find(".home-blog-modern-removed-content").addClass("home-blog-modern-removed-content-move");
	  }).mouseout(function(){
		$(this).parent().find(".home-blog-modern-removed-content").removeClass("home-blog-modern-removed-content-move");
	});

	
	$(".home-blogs-modern-item .gallery img").mouseover(function() {
		$(this).parents(".home-blogs-modern-item-image-container").find(".home-blog-modern-removed-content").addClass("home-blog-modern-removed-content-move");
	  }).mouseout(function(){
		$(this).parents(".home-blogs-modern-item-image-container").find(".home-blog-modern-removed-content").removeClass("home-blog-modern-removed-content-move");
	});
	
	
	$(".homepage-blog-colored-design-item.format-standard , .homepage-blog-colored-design-item.format-video , .homepage-blog-colored-design-item.format-gallery").mouseover(function() {
		$(this).addClass("homepage-blog-colored-hover");
		$(this).find(".homepage-blog-colored-design-hover").addClass("homepage-blog-colored-design-hover-move");
	  }).mouseout(function(){
		$(this).removeClass("homepage-blog-colored-hover");	  
		$(this).find(".homepage-blog-colored-design-hover").removeClass("homepage-blog-colored-design-hover-move");
	});		
	
	
	$(".blog-image-container-for-modern-design , .homepage-blog-colored-design-item").mouseover(function() {
		$(this).find(".blog-image-modern-content-hidden").addClass("blog-image-modern-content-view");
		$(this).find(".blog-image-modern-title").addClass("blog-image-modern-title-hidden");		
	  }).mouseout(function(){
		$(this).find(".blog-image-modern-content-hidden").removeClass("blog-image-modern-content-view");
		$(this).find(".blog-image-modern-title").removeClass("blog-image-modern-title-hidden");
	});			

	
	$(".newsletter-email").attr('placeholder', 'Your email to stay updated');
	
	$(window).scroll(function () {
		var GetHeaderHeight = $('.container-wide').height();
		if ($(this).scrollTop() > GetHeaderHeight) {
			if($("#cssmenu ul:first").hasClass("prof-cssmenu-medium")){
			
			} else {
				
			}
		} else {
			
		}
	});	
	
	$("#cssmenu ul:first li li ul").each(function() {
		var getprofsubmenuposition = $(this).offset();
		var windowWidth =  $( window ).width() - 200;

		if(getprofsubmenuposition.left > windowWidth){$(this).addClass("prof-cssmenu-flip-it");}
		
	});	
		
	

	$(".flickr_badge_image a").each(function() {	
		$(this).append( "<i class='icon-plus'></i>" );
	});		
		

	$(".flickr_badge_image a , .sentient-gallery-small-thumbnails a").mouseover(function() {
		$(this).find(".icon-plus").addClass("icon-plus-hover");	
	  }).mouseout(function(){
		$(this).find(".icon-plus").removeClass("icon-plus-hover");	
	});

	$(".sentient-social-shortcode-container").mouseover(function() {
		$(this).addClass("sentient-social-shortcode-container-hover");	
		$(this).find("i").addClass("icon-social-hover");
		$(this).find(".sentient-header-top-popup-container").addClass("sentient-header-top-popup-container-show");		
	  }).mouseout(function(){
		$(this).removeClass("sentient-social-shortcode-container-hover");
		$(this).find("i").removeClass("icon-social-hover");
		$(this).find(".sentient-header-top-popup-container").removeClass("sentient-header-top-popup-container-show");	
	});	
	

	$(".sentient-portfolio-four-col-thumb").mouseover(function() {
		$(this).addClass("sentient-portfolio-four-col-thumb-show");	
	  }).mouseout(function(){
		$(this).removeClass("sentient-portfolio-four-col-thumb-show");
	});	

	
	$(".flickr_badge_image").mouseover(function() {
		$(this).addClass("flickr_badge_image_hover");		
	  }).mouseout(function(){
		$(this).removeClass("flickr_badge_image_hover");	
	});		
	
	$(".div-top").mouseover(function() {
		$(this).find("i").addClass("icon-up-open-hover");		
	  }).mouseout(function(){
		$(this).find("i").removeClass("icon-up-open-hover");	
	});

	$(".sentient-iconsone-container").mouseover(function() {
		$(this).find(".sentient-iconsOne-iconContainer").addClass("sentient-homepage-icon-styleone-iconcontainer-hover");		
		$(this).find(".sentient-iconsOne-iconContainer i").addClass("homepage-icon-hover");
		$(this).find(".sentient-header-search-pointer").addClass("sentient-header-search-pointer-icon-hover");
	  }).mouseout(function(){
		$(this).find(".sentient-iconsOne-iconContainer").removeClass("sentient-homepage-icon-styleone-iconcontainer-hover");		
		$(this).find(".sentient-iconsOne-iconContainer i").removeClass("homepage-icon-hover");
		$(this).find(".sentient-header-search-pointer").removeClass("sentient-header-search-pointer-icon-hover");	  	
	});
	
	$(".sentient-portfolio-fullwidth-thumb").mouseover(function() {
		$(this).addClass("sentient-portfolio-fullwidth-thumb-hover");		
	  }).mouseout(function(){
		$(this).removeClass("sentient-portfolio-fullwidth-thumb-hover");	  	
	});
	
	$(".sentient-blog-normal-thumb").mouseover(function() {
		$(this).find("i").addClass("icon-hover");		
		$(this).addClass("sentient-blog-normal-thumb-hover");
	  }).mouseout(function(){
	  	$(this).find("i").removeClass("icon-hover");		
		$(this).removeClass("sentient-blog-normal-thumb-hover");
	});	
	
	
	
	
	


	
	$(window).bind("load", function() {
	
	
		$(".sentient-testimonial-with-thumb-container .flex-control-nav.flex-control-paging li a").each(function() {
			$(this).text(' ');
		});	
		
	
		
	
	
		

		$(".sentient-gallery .ls-thumbnail-wrapper .ls-thumbnail-slide a").each(function() {	
			$(this).append( "<i class='icon-plus'></i>" );
		});	
		
		$(".sentient-gallery .ls-thumbnail-wrapper .ls-thumbnail-slide a").hover(function(){
		   $(this).trigger('click');
		});

		$(".flex-control-nav.flex-control-thumbs li").each(function() {	
			$(this).append( "<i class='icon-plus'></i>" );
		});

		$(".sentient-blog-normal-container.sentient-blog-slider-container .flex-direction-nav .flex-prev").each(function() {	
			$(this).append( "<i class='icon-left-open'></i>" );
		});

		$(".sentient-blog-normal-container.sentient-blog-slider-container .flex-direction-nav .flex-next").each(function() {	
			$(this).append( "<i class='icon-right-open'></i>" );
		});

		
		$(".sentient-gallery-slideshow.sentient-gallery-slideshow-play .flex-direction-nav .flex-prev ").each(function() {	
			$(this).append( "<i class='icon-left-open'></i>" );
		});
		
		$(".sentient-gallery-slideshow.sentient-gallery-slideshow-play .flex-direction-nav .flex-next").each(function() {	
			$(this).append( "<i class='icon-right-open'></i>" );
		});
	
		$(".sentient-top-rated-items .flex-direction-nav .flex-prev").each(function() {	
			$(this).append( "<i class='icon-left-open'></i>" );
		});

		$(".sentient-top-rated-items .flex-direction-nav .flex-next").each(function() {	
			$(this).append( "<i class='icon-right-open'></i>" );
		});	
		
		$(".sentient-gallery-slideshow.sentient-gallery-slideshow-play .flex-control-nav.flex-control-thumbs li").each(function() {
			var getSrc = $(this).find("img").attr('src');
			var getTitle = $(this).parent().parent().find("ul.slides li[data-thumb$='" + getSrc + "']").find("img").attr('alt');
			/*var getTitle = $(this).parent().parent().parent().parent().find("ul.slides img[src$='" + getSrc + "']").attr('alt');*/
			/*var getTitle = $(this).parent().parent().find("ul.slides img[src$='" + getSrc + "']").attr('alt');*/
			
			if(getTitle != ''){
				$(this).append( "<div class='sentient-header-top-popup-container animated'><span class='sentient-tooltip'>" + getTitle + "</span></div>" );
				$(this).find("img").wrap("<div class='gallery-thumbnail-wrapper'></div>");
			}
		});



	
	
		$("video").each(function() {
			$(this).addClass("sentient-show-video");
		});
		
		var SentientGenerateID = 1;
		$(".sentient-rotator-container.sentient-rotator-container-show .sentient-rotator").each(function() {
			$(this).attr("sentient-id",SentientGenerateID);
			
			SentientGenerateID = SentientGenerateID + 1;
		});	
	
	});	

	function thisHeight(){
		return $(this).height();
	}




		
	
	$(".sentient-list-items li").each(function() {
		$(this).prepend("<i class='fa-check-square-o'></i>");
	});	
	
	
	$(".sentient-gallery-slideshow .gallery-item").each(function() {
		var currentheight = $(this).parent().height();
		var thisULMax = $(this).find("img").height();
		if(thisULMax > currentheight){
			$(this).parent().css({ "height": thisULMax + "px"});
		}
	});	
	
	
	$(".sentient-clients-row .vc_row .vc_col-sm-3 img").each(function() {
		/*var getclienttext = $(this).parent().find("h2").text();*/
		var getclienttext = $(this).attr("alt");
		if(getclienttext != ''){
			var clienthtmltoadd = "<div class='sentient-header-top-popup-container animated'><span class='sentient-tooltip'>" + getclienttext + "</span></div>";

			$(this).parent().prepend(clienthtmltoadd);
		}
	});		
	
	$(".sentient-clients-slider-container .slides li img").each(function() {
		/*var getclienttext = $(this).parent().find("h2").text();*/
		var getclienttext = $(this).attr("alt");
		if(getclienttext != ''){
			var clienthtmltoadd = "<div class='sentient-header-top-popup-container animated'><span class='sentient-tooltip'>" + getclienttext + "</span></div>";

			$(this).parent().prepend(clienthtmltoadd);
		}
	});		
	
	
	$(".sentient-portfolio-two-three-layout-left li.item").mouseover(function() {
		$(this).addClass("sentient-portfolio-four-col-thumb-show");	
	  }).mouseout(function(){
		$(this).removeClass("sentient-portfolio-four-col-thumb-show");	
	});	
	
	$(".project_slides li.item").mouseover(function() {
		$(this).addClass("sentient-portfolio-four-col-thumb-show");	
	  }).mouseout(function(){
		$(this).removeClass("sentient-portfolio-four-col-thumb-show");	
	});	

	
	$(".sentient-clients-row .vc_row .vc_col-sm-3 img").mouseover(function() {
		$(this).parent().find(".sentient-header-top-popup-container").addClass("sentient-header-top-popup-container-show");	
	  }).mouseout(function(){
		$(this).parent().find(".sentient-header-top-popup-container").removeClass("sentient-header-top-popup-container-show");	
	});	

	
	$(".sentient-gallery-thumb-container").mouseover(function() {
		$(this).parent().removeClass("sentient-gallery-slideshow-play").addClass("sentient-gallery-slideshow-stop");		
	  }).mouseout(function(){
		$(this).parent().removeClass("sentient-gallery-slideshow-stop").addClass("sentient-gallery-slideshow-play");	  	
	});	
		
	$(".sentient-video-tutorial-thumbnail").mouseover(function() {
		$(this).addClass("sentient-video-tutorial-thumbnail-hover");		
	  }).mouseout(function(){
		$(this).removeClass("sentient-video-tutorial-thumbnail-hover");	  	
	});			

	
	
		
	$( window ).resize(function() {
		$(".sentient-gallery-list.slides").each(function() {
			var currentheight = $(this).find("li:first-child").height();
			$(this).css({ "height": currentheight + "px"});
		});		
	});		
		
	/*$(".sentient-gallery-slideshow > div.gallery-item:gt(0)").hide();	
	
	var testinterval = setInterval(function() { 
	  $('.sentient-gallery-slideshow.sentient-gallery-slideshow-play > div.gallery-item:first')
		.fadeOut(1000)
		.next()
		.fadeIn(1000)
		.end()
		.appendTo('.sentient-gallery-slideshow');
	},  5000);	
	
				*/
				
	
	
	/*
	$(".sentient-gallery-slideshow > div.gallery-item:gt(0)").hide();	
	
	$(".sentient-gallery-thumb-container span.gallery-icon").mouseover(function() {
		var gethoveredclass = $(this).attr('id');
		var gethoveredindex = $(this).index();
		$(this).parent().parent().parent().find(".gallery-item:gt(" + gethoveredindex + ") , .gallery-item:lt(" + gethoveredindex + ")").each(function() {
			$(this).fadeOut(1000);
		});			
		$(this).parent().parent().parent().find("." + gethoveredclass).fadeIn(1000);
	}).mouseout(function(){
		var gethoveredclass = $(this).attr('id');
		$(this).parent().parent().parent().find("." + gethoveredclass).fadeIn(1000);
	});	
	*/
	
	/*$(".sentient-pica").PikaChoose({thumbChangeEvent:'mouseover.pikachoose' , autoPlay:true, thumbOpacity:0.7, speed:3000});*/
	
	
	
	$(".sentient-gallery-slideshow.sentient-gallery-slideshow-play").each(function() {
		$(this).flexslider({
			animation: "fade",
			slideshow: false,
			controlNav: "thumbnails",
			directionNav: true, 
			pauseOnAction: false,			
			start: function(slider){
				$(".flex-control-nav.flex-control-thumbs li i").live('click', function(e){
					$(this).parent().find(".gallery-thumbnail-wrapper img").trigger("click");
				});
				
				$('.flex-control-nav.flex-control-thumbs li img').mouseover(function(){
					/* var activeSlide = 'false';
					 if ($(this).hasClass('flex-active')){  
						activeSlide = 'true';                       
					 }
					 if (activeSlide == 'false'){
						$(this).parent().parent().parent().parent().find(".flex-active-slide img").hide();
						$(this).delay(1000).trigger("click");						
						$(this).parent().parent().parent().parent().find(".flex-active-slide img").show();
					 }
					 $(this).parent().find("i").addClass("icon-plus-gallery-hover");*/
				 });

				$('.flex-control-nav.flex-control-thumbs li').mouseover(function(){
					$(this).find("i").addClass("icon-plus-gallery-hover");
				 }).mouseout(function(){
					$(this).find("i").removeClass("icon-plus-gallery-hover");  	
				 });					 
			}		
		});
	});	


	$('.people-container.people-container-circle-shape').mouseover(function(){
		$(this).find(".icon-thumbnail").addClass("icon-thumbnail-hover");
	 }).mouseout(function(){
		$(this).find(".icon-thumbnail").removeClass("icon-thumbnail-hover");  	
	 });
				 
				 	 
	$('.sentient-map-logo').mouseover(function(){
		$(this).addClass("sentient-map-logo-hover");
	 }).mouseout(function(){
		$(this).removeClass("sentient-map-logo-hover");  	
	 });
				 
	$('.sentient-gallery-list.slides img').each(function() {
		$(this).css('display', 'block !important');
		$(this).show();
	});			

	
	
	$('.sentient-team-three-col li .sentient-team-thumb').mouseover(function(){
		$(this).find(".sentient-team-social").addClass("sentient-team-social-hover");
		$(this).addClass("sentient-team-thumb-hover");
	 }).mouseout(function(){
		$(this).find(".sentient-team-social").removeClass("sentient-team-social-hover"); 
		$(this).removeClass("sentient-team-thumb-hover");		
	 });	
	
	$('.sentient-clients-slider-container').each(function() {
		$(this).flexslider({
			animation: "slide",
			slideshow: true,
			animationLoop: true,
			controlNav: false,
			directionNav: false, 			
			itemWidth: 300,
			itemMargin: 0
		});
	});	
	
	
	$('.sentient-blog-normal-container.sentient-blog-slider-container').each(function() {
		$(this).flexslider({
			animation: "slide",
			slideshow: false,
			animationLoop: false,
			itemWidth: 240,
			itemMargin: 35
		});
	});		

	$('.sentient-testimonial-with-thumb-container').each(function() {
		var makerotation = false;
		
		if ( $( this ).hasClass( "sentient-auto-rotate" ) ) {makerotation = true;}
		
		$(this).flexslider({
			animation: "slide",
			slideshow: makerotation,
			animationLoop: makerotation
		});
	});		
	



	(function() {
	 

	  $(window).load(function() {
		$('.sentient-testimonial-with-thumb-container.sentient-testimonial-single-container').each(function() {
			var makerotation = false;
		
			if ( $( this ).hasClass( "sentient-auto-rotate" ) ) {makerotation = true;}			
			
			$(this).flexslider({
				animation: "fade",
				slideshow: makerotation,
				animationLoop: makerotation
			});
		});		  
			
		$('.sentient-testimonial-with-thumb-container.sentient-testimonial-single-container').each(function() {
			var getcolor = $(this).css("color");
			$(this).find(".flex-control-nav.flex-control-paging li a.flex-active").css( "background", getcolor + " !important" );
		});					
			
	  });
	 

	}());			
	
	/*.sentient-testimonial-with-thumb-container.sentient-testimonial-single-container .flex-control-nav.flex-control-paging li a.flex-active:hover,
.sentient-testimonial-with-thumb-container.sentient-testimonial-single-container .flex-control-nav.flex-control-paging li a:hover{
	background:inherit !important;
}*/
	
	(function() {
	 
	  /* store the slider in a local variable*/
	  var $window = $(window),
		  flexslider;
	 
	  /* tiny helper function to add breakpoints*/
	  function getGridSize() {
		return (window.innerWidth < 1400) ? 337 :
			   (window.innerWidth > 1400) ? 475 : 337;
	  }

	 
	  $(window).load(function() {
		$('.sentient-products-four-col').flexslider({
			animation: "slide",
			animationLoop: false,
			slideshow: false,
			itemWidth: getGridSize(),
			itemMargin: 0,
			start: function(){
				 $('.sentient-products-four-col .slides img').show(); 
			},		  
		  /*minItems: getGridSize(),  use function to pull in initial value*/
		  /*maxItems: getGridSize()  use function to pull in initial value*/
		});
			
		$(".sentient-products-four-col .flex-direction-nav .flex-prev").each(function() {	
			$(this).append( "<i class='icon-left-open'></i>" );
		});

		$(".sentient-products-four-col .flex-direction-nav .flex-next").each(function() {	
			$(this).append( "<i class='icon-right-open'></i>" );
		});					
			
	  });
	 

	}());		
	
	
	(function() {
	 
	  /* store the slider in a local variable*/
	  var $window = $(window),
		  flexslider;
	 
	  /* tiny helper function to add breakpoints*/
	  function getGridSize() {
		return (window.innerWidth < 1400) ? 270 :
			   (window.innerWidth > 1400) ? 380 : 270;
	  }

	 
	  $window.load(function() {
		$('.sentient-portfolio-six-col').flexslider({
			animation: "slide",
			animationLoop: false,
			slideshow: false,
			itemWidth: getGridSize(),
			itemMargin: 0,  
		  /*minItems: getGridSize(),  use function to pull in initial value*/
		  /*maxItems: getGridSize()  use function to pull in initial value*/
		});
		
		$(".sentient-portfolio-six-col .flex-direction-nav .flex-prev").each(function() {	
			$(this).append( "<i class='icon-left-open'></i>" );
		});

		$(".sentient-portfolio-six-col .flex-direction-nav .flex-next").each(function() {	
			$(this).append( "<i class='icon-right-open'></i>" );
		});				
	  });
	 

	}());	
	

	
	$(".sentient-top-rated-items-add-to-cart a").each(function() {	
		$(this).prepend( "<i class='icon-basket'></i>" );
	});	
		
	$(".proftheme-widget #searchform").each(function() {	
		$(this).append( "<i class='icon-search'></i>" );
	});

	
		
		
	$('.sentient-top-rated-items').each(function() {
		$(this).flexslider({
			animation: "slide",
			slideshow: false,
			animationLoop: false,
			itemWidth: 285,
			itemMargin: 30
		});
	});	

	
	
	
	$(".sentient-clients-slider-container ul li").mouseover(function() {
		$(this).find(".sentient-header-top-popup-container").addClass("sentient-header-top-popup-container-client-show");	
	  }).mouseout(function(){
		$(this).parent().find(".sentient-header-top-popup-container").removeClass("sentient-header-top-popup-container-client-show");	
	});		
	
	$(".sentient-products-four-col li").mouseover(function() {
		$(this).addClass("sentient-products-four-col-hover");	
	  }).mouseout(function(){
		$(this).removeClass("sentient-products-four-col-hover");	
	});			
	
	$(".sentient-social-shortcode-style-two-container").first().addClass("sentient-social-shortcode-style-two-first");
	$(".sentient-social-shortcode-style-two-container").last().addClass("sentient-social-shortcode-style-two-last");
	
	
	$(".sentient-lean-slider").each(function() {
			$(this).addClass("sentient-lean-slider-already-loaded");
			var getsliderID = $(this).attr('id');
			var getslidernavID = $(this).parent().find('.sentient-lean-slider-nav').attr('id');
			var slider = $('#' + getsliderID).leanSlider({
				directionNav: '#' + getslidernavID,
				pauseTime: false,
			});
	});			

	$(".sentient-animated-numbers").each(function() {
		var getclasses = $(this).attr('class').split(' ')[1];
		getclasses = parseInt(getclasses);
		$(this).numinate({
			format: '%counter%',
			from: 1,
			to: getclasses,
			runningInterval: 1000,
			stepUnit: 1,
			autoStart: false,
			onStop: $(this).parent().find(".sentient-animated-numbers-text").addClass("sentient-fade-me")
		});		
	});
	

	
	$(".sentient-blog-slider-container ul.flex-direction-nav a.flex-prev , .sentient-blog-slider-container ul.flex-direction-nav a.flex-next").mouseover(function() {
		$(this).parent().addClass("flexslider-arrow-show");	
	  }).mouseout(function(){
		$(this).parent().removeClass("flexslider-arrow-show");	
	});		
	
	$(".sentient-top-rated-items ul.flex-direction-nav a.flex-prev , .sentient-top-rated-items ul.flex-direction-nav a.flex-next").mouseover(function() {
		$(this).parent().addClass("flexslider-arrow-show");	
	  }).mouseout(function(){
		$(this).parent().removeClass("flexslider-arrow-show");	
	});		
	
	$(".sentient-gallery-slideshow.sentient-gallery-slideshow-play .flex-control-nav.flex-control-thumbs li").mouseover(function() {
		$(this).addClass("sentient-gallery-slideshow-thumbnail-hover");	
	  }).mouseout(function(){
		$(this).removeClass("sentient-gallery-slideshow-thumbnail-hover");	
	});		
	
	

	$("ul#portfolio-masonry-list li , .sentient-portfolio-five-col ul li , .sentient-portfolio-six-col ul li").mouseover(function() {
		$(this).addClass("sentient-portfolio-five-col-hover");	
	  }).mouseout(function(){
		$(this).removeClass("sentient-portfolio-five-col-hover");	
	});	


	$(".sentient-header-cart-container").mouseover(function() {
		$(this).find(".sentient-header-cart-items-container").addClass("sentient-header-cart-items-container-show");	
	  }).mouseout(function(){
		$(this).find(".sentient-header-cart-items-container").removeClass("sentient-header-cart-items-container-show");
	});			
	
	
	/*$("#portfolio-list").filterable(); */
	
	$(window).bind("load", function() {
	
		
		var $sentientcontainerfilter = $('#portfolio-list').isotope({
			layoutMode: 'fitRows'
		});
		
		var $sentientcontainerfilterfull = $('#portfolio-list.sentient-full-portfolio-items').isotope({
			layoutMode: 'fitRows'
		});		
		

			
		$('#portfolio-filter').on( 'click', 'button', function() {
		  var filterValue = $(this).attr('data-filter');
		  $sentientcontainerfilter.isotope({
			filter: filterValue,
			layoutMode: 'fitRows',
			itemSelector: '.item',
			masonry: {
				columnWidth: $sentientcontainerfilter.find('.grid-sizer')[0]
			}
			});
			
		  $sentientcontainermasonry.isotope({
			filter: filterValue,
			layoutMode: 'masonry',
			itemSelector: '.grid-sizer'
			});

			var filterContainerValue = $("#portfolio-grid-frame");
			filterContainerValue.isotope({
				filter: filterValue
			});
			
		
		});
		
		
		$('.project_flexslider').flexslider({
			selector: ".project_slides > li",
			smoothHeight: true,
			prevText: "<i class='icon-left-open'></i>", /*Changed by Sentient*/
			nextText: "<i class='icon-right-open'></i>", /*Changed by Sentient*/
			animation: 'slide',
			animationLoop: false,
			video: true,
			controlNav: true,
			slideshow: false,
			start: function (slideshow) {			
				$('.project_flexslider li img').each(function() {
					$(this).addClass("sentient-show-img");
				});
				
			}
		});		
	
		
		var $sentientcontainermasonry = $('#portfolio-masonry-list').isotope({
			layoutMode: 'masonry',
			itemSelector: '.grid-sizer'
		});
	
		$sentientcontainermasonry.infinitescroll({
			navSelector : '.portfolio-pagination',
			nextSelector : '.portfolio-pagination a.next', 
			itemSelector : '.grid-sizer',	
			animate : true		
		},
			function( newElements ) {
				var $newElems = $( newElements ).css({ opacity: 0 });
				
					$newElems.animate({ opacity: 1 });
					$sentientcontainermasonry.isotope( 'appended', $newElems );
				/*$newElems.imagesLoaded(function() { 
					$newElems.animate({ opacity: 1 });
					$sentientcontainermasonry.isotope( 'appended', $newElems );
				});*/
							
				$("ul#portfolio-masonry-list li").mouseover(function() {
					$(this).addClass("sentient-portfolio-five-col-hover");	
				  }).mouseout(function(){
					$(this).removeClass("sentient-portfolio-five-col-hover");	
				});					
				
			}

		);

		
	});
		
	

	var $sentientBlogGrid = $('.blog-fullwidth-grid-container');
	$sentientBlogGrid.isotope({
		itemSelector: '.sentient-post',	
		masonry: {
		  gutterWidth: 10,
		  isFitWidth: true
		}			
	});

	
	var $sentientcontainer = $('#SentientContainer');
	$sentientcontainer.isotope({
		itemSelector: '.sentient-post',			
		masonry: {
		  gutterWidth: 10,
		  isFitWidth: true
		}			
	});		
	
	$('.portfolio-filter-blog').on( 'click', 'button', function() {
	  var filterValue = $(this).attr('data-filter');
	  $sentientBlogGrid.isotope({
			itemSelector: '.sentient-post',	
			filter: filterValue,			
			masonry: {
			  gutterWidth: 10,
			  isFitWidth: true
			}
		});
		
	});	
	
	$('.portfolio-filter-blog-full').on( 'click', 'button', function() {
	  var filterValue = $(this).attr('data-filter');
	  $sentientcontainer.isotope({
			itemSelector: '.sentient-post',
			filter: filterValue,				
			masonry: {
			  gutterWidth: 10,
			  isFitWidth: true
			}
		});
		
	});		
	

	
	
	var $sentientcontainer = $('#SentientContainer');
	
	$('#page_nav_button_load').on( 'click', 'button', function() {

	});		
	
	$sentientcontainer.infinitescroll({
		navSelector : '#page_nav',
		nextSelector : '#page_nav a.next', 
		itemSelector : '.sentient-post',	
		animate : true,
		errorCallback: function(){
			$("#page_nav_button_load").text("NO MORE POSTS TO LOAD");
		},		
	},
		function( newElements ) {
			var $newElems = $( newElements ).css({ opacity: 0 });
			
			$(".page-nav-button-loader").addClass("page-nav-button-loader-show");
			
			$newElems.animate({ opacity: 1 });
			$sentientcontainer.isotope( 'appended', $newElems );			
			
			
			/*$newElems.imagesLoaded(function() { 
				$newElems.animate({ opacity: 1 });
				$sentientcontainer.isotope( 'appended', $newElems );
			});*/
						
			$(".sentient-lean-slider").each(function() {
					if(!$(this).hasClass("sentient-lean-slider-already-loaded")){			
						var getsliderID = $(this).attr('id');
						var getslidernavID = $(this).parent().find('.sentient-lean-slider-nav').attr('id');
						var slider = $('#' + getsliderID).leanSlider({
							directionNav: '#' + getslidernavID,
							pauseTime: false,
						});
					}					
			});
			
			$(".wp-audio-shortcode").each(function() {
					if(!$(this).hasClass("mejs-audio")){			
						$(this).mediaelementplayer( );	
					}					
			});
			
			setTimeout(
			  function() 
			  {
				$(".page-nav-button-loader").removeClass("page-nav-button-loader-show");
			  }, 4000);
		}

	);	
	
	$(window).unbind('.infscr');

    $('#page_nav_button_load').live('click', function(e){
        $sentientcontainer.infinitescroll('retrieve');	
     return false;
    });	
	

	
	$(".sentient-iconsFour-Container").each(function() {
		$(this).parent().parent().addClass("sentient-homepage-icon-stylefour-wrapper");
		$(this).parent().parent().parent().addClass("sentient-homepage-icon-stylefour-main-wrapper");
	});	
	
	
	
	$(".pricing-column").each(function() {
		if($(this).parent().parent().hasClass("vc_col-sm-3")){
			$(this).parent().parent().addClass("sentient-pricing-column-vc-span3");
		} else if($(this).parent().parent().hasClass("vc_col-sm-4")){
			$(this).parent().parent().addClass("sentient-pricing-column-vc-span4");
		}
	});	
	
	$(".pricing-column.pricing-main-column").each(function() {
		if($(this).parent().parent().hasClass("vc_col-sm-3")){
			$(this).parent().parent().addClass("sentient-pricing-column-vc-span3-main");
		} else if($(this).parent().parent().hasClass("vc_col-sm-4")){
			$(this).parent().parent().addClass("sentient-pricing-column-vc-span4-main");
		}
	});
	

	$(".sentient-iconsone-container.sentient-working-process").each(function() {
		$(this).parent().parent().addClass("sentient-working-process-container");
	});
	
	
	$(".sentient-iconsFive-Container").each(function() {
		$(this).parent().parent().addClass("sentient-homepage-icon-stylefive-wrapper");
	});	
	
	$(".wpb_column.sentient-homepage-icon-stylefour-wrapper").mouseover(function() {
		$(this).addClass("sentient-homepage-icon-stylefour-wrapper-hover");	
	  }).mouseout(function(){
		$(this).removeClass("sentient-homepage-icon-stylefour-wrapper-hover");	
	});	
	
	
	$(".vc_column_container.sentient-homepage-icon-stylefive-wrapper").mouseover(function() {
		$(this).addClass("sentient-homepage-icon-stylefive-wrapper-hover");	
	  }).mouseout(function(){
		$(this).removeClass("sentient-homepage-icon-stylefive-wrapper-hover");	
	});		
	
	
	
	$(".home-blogs-modern-container .post , .home-blogs-modern-container .team").mouseover(function() {
		$(this).find(".sentient-header-top-popup-container").addClass("sentient-header-top-popup-container-show");
		$(this).find(".sentient-post-related-container").addClass("sentient-post-related-container-color");
	  }).mouseout(function(){
		$(this).find(".sentient-header-top-popup-container").removeClass("sentient-header-top-popup-container-show");
		$(this).find(".sentient-post-related-container").removeClass("sentient-post-related-container-color");		
	});	
	
	
	$(".sentient-iconsSix-Container").mouseover(function() {
		$(this).addClass("sentient-homepage-icon-stylefive-wrapper-hover");	
	  }).mouseout(function(){
		$(this).removeClass("sentient-homepage-icon-stylefive-wrapper-hover");	
	});
	
	$(".sentient-woocommerce-shop-container ul.products li .sentient-top-rated-items-thumb").mouseover(function() {
		$(this).addClass("sentient-top-rated-items-thumb-hover");	
	  }).mouseout(function(){
		$(this).removeClass("sentient-top-rated-items-thumb-hover");	
	});

	$(".sentient-top-rated-items-add-to-cart , .sentient-top-rated-items-view-details").mouseover(function() {
		$(this).addClass("sentient-top-rated-items-hover");	
	  }).mouseout(function(){
		$(this).removeClass("sentient-top-rated-items-hover");	
	});	
	

	
	$(".sidebar-container .proftheme-widget ul li").each(function() {
		$(this).prepend("<i class='icon-right-open-mini'></i>");
	});
	
	$(".sidebar-container .latest-tweets ul li").each(function() {
		$(this).prepend("<i class='icon-twitter'></i>");
	});	
	
	
	
	$(".sentient-single-row").each(function() {
		$(this).wrapInner("<div class='homepage-container-design-inner'></div>");
	});		
	
	$(".wpb_toggle").each(function() {
		$(this).append("<i class='fa-plus'></i>");
		$(this).append("<i class='fa-minus'></i>");
	});	
	
	$(".wpb_accordion_header").each(function() {
		$(this).append("<i class='fa-plus'></i>");
		$(this).append("<i class='fa-minus'></i>");
	});

	
	$(".woocommerce-pagination ul.page-numbers li a.next").each(function() {
		$(this).empty().prepend("<i class='icon-right-open'></i>");
	});
	
	$(".woocommerce-pagination ul.page-numbers li a.prev").each(function() {
		$(this).empty().prepend("<i class='icon-left-open'></i>");
	});	
	
	$(".portfolio-pagination a.next").each(function() {
		$(this).empty().prepend("<i class='icon-right-open'></i>");
	});		
	
	$(".portfolio-pagination a.prev ").each(function() {
		$(this).empty().prepend("<i class='icon-left-open'></i>");
	});	
	
	$(".sidebar-container ul li").mouseover(function() {
		$(this).addClass("sidebar-list-hovered");	
	  }).mouseout(function(){
		$(this).removeClass("sidebar-list-hovered");	
	});		

	

	$(".blog-middle-container .post .blog-modern-left-box-thumb , .blog-middle-container .post .sentient-blog-listing-gallery-container").mouseover(function() {
		$(this).find("i").addClass("icon-hover");
		$(this).find("img").addClass("blog-image-hover");
		$(this).find(".sentient-lean-slider-nav").addClass("sentient-lean-slider-nav-hover");
	  }).mouseout(function(){
		$(this).find("i").removeClass("icon-hover");
		$(this).find("img").removeClass("blog-image-hover");
		$(this).find(".sentient-lean-slider-nav").removeClass("sentient-lean-slider-nav-hover");
	});	
	
	$( window ).resize(function() {
		$(".sentient-gallery-slideshow .gallery-item").each(function() {
			var currentheight = $(this).parent().height();

			var thisULMax = $(this).height();
			$(this).parent().css({ "height": thisULMax + "px"});
		});		
		
	});


	

	var win = $(window);
	var allMods = $(".sentient-portfolio-fw-container.sentient-portfolio-fullwidth-container-animate ul li");

	// Already visible modules
	allMods.each(function(i, el) {
	  var el = $(el);
	  if (el.visible(true)) {
		el.addClass("already-visible"); 
	  } 
	});

	win.scroll(function(event) {
	  
	  allMods.each(function(i, el) {
		var el = $(el);
		if (el.visible(true)) {
		  el.addClass("come-in"); 
		} 
	  });
	  
	});	
	
	
	var allModsone = $(".sentient-pop-me");

	// Already visible modules
	allModsone.each(function(i, el) {
	  var el = $(el);
	  if (el.visible(true)) {
		el.addClass("already-visible"); 
	  } 
	});

	win.scroll(function(event) {
	  
	  allModsone.each(function(i, el) {
		var el = $(el);
		if (el.visible(true)) {
		  el.addClass("sentient-popup"); 
		} 
	  });
	  
	});		
	
	
	var allModstwo = $(".sentient-fade-me");

	// Already visible modules
	allModstwo.each(function(i, el) {
	  var el = $(el);
	  if (el.visible(true)) {
		el.addClass("already-visible"); 
	  } 
	});

	win.scroll(function(event) {
	  
	  allModstwo.each(function(i, el) {
		var el = $(el);
		if (el.visible(true)) {
		  el.addClass("sentient-fade-me-start"); 
		} 
	  });
	  
	});		
	
	
	var allModsthree = $(".sentient-button-fade");

	// Already visible modules
	allModsthree.each(function(i, el) {
	  var el = $(el);
	  if (el.visible(true)) {
		el.addClass("already-visible"); 
	  } 
	});

	win.scroll(function(event) {
	  
	  allModsthree.each(function(i, el) {
		var el = $(el);
		if (el.visible(true)) {
		  el.addClass("sentient-button-fade-me-start"); 
		} 
	  });
	  
	});		
	
	
	var allModsfour = $(".sentient-icons-fade .vc_column_container .icon-thumbnail");

	// Already visible modules
	allModsfour.each(function(i, el) {
	  var el = $(el);
	  if (el.visible(true)) {
		el.addClass("already-visible"); 
	  } 
	});

	win.scroll(function(event) {
	  
	  allModsfour.each(function(i, el) {
		var el = $(el);
		if (el.visible(true)) {
		  el.addClass("sentient-icons-fade-start"); 
		} 
	  });
	  
	});	
	
	var allModsfive = $(".sentient-wrap-me");

	// Already visible modules
	allModsfive.each(function(i, el) {
	  var el = $(el);
	  if (el.visible(true)) {
		el.addClass("already-visible"); 
	  } 
	});

	win.scroll(function(event) {
	  
	  allModsfive.each(function(i, el) {
		var el = $(el);
		if (el.visible(true)) {
		  el.addClass("sentient-wrap-me-start"); 
		} 
	  });
	  
	});		
	
	
	var allModssix = $(".sentient-icons-fade li");

	// Already visible modules
	allModssix.each(function(i, el) {
	  var el = $(el);
	  if (el.visible(true)) {
		el.addClass("already-visible"); 
	  } 
	});

	win.scroll(function(event) {
	  
	  allModssix.each(function(i, el) {
		var el = $(el);
		if (el.visible(true)) {
		  el.addClass("sentient-icons-fade-start"); 
		} 
	  });
	  
	});		
	
	
	var allModspPercentageBar = $(".sentient-bar-container-bar");

	// Already visible modules
	allModspPercentageBar.each(function(i, el) {
	  var el = $(el);
	  if (el.visible(true)) {
		el.addClass("already-visible"); 
	  } 
	});

	win.scroll(function(event) {
	  
	  allModspPercentageBar.each(function(i, el) {
		var el = $(el);
		if (el.visible(true)) {
		  el.removeClass("sentient-bar-container-bar-remove"); 
		} 
	  });
	  
	});		
	

	var allModspPercentageCircle = $(".sentient-rotator-container.sentient-rotator-container-show .sentient-rotator");

	// Already visible modules
	allModspPercentageCircle.each(function(i, el) {
	  var el = $(el);
	  if (el.visible(true)) {
		el.addClass("already-visible");
	  } 
	});

	win.scroll(function(event) {
	  
	  allModspPercentageCircle.each(function(i, el) {
		var el = $(el);
		if (el.visible(true)) {
		  /*el.addClass("sentient-rotator-container-show");*/
		  el.rotator({
				starting: 0,
				ending: el.attr("data-sentient-percentage"),
				percentage: true,
				color: el.attr("data-sentient-percentage-color"),
				lineWidth: 5,
				timer: 10,
				radius: 75,
				fontStyle: el.attr("data-sentient-font"),
				fontSize: '28px',
				fontColor: el.attr("data-sentient-percentage-color"),
				backgroundColor: '#f2f2f2',
				callback: function () {
					el.addClass("sentient-stop-circle");
				}
			});
		} 
	  });
	  
	});				
	

	
	var allModsAnimate = $(".sentient-animated-numbers");

	// Already visible modules
	allModsAnimate.each(function(i, el) {
	  var el = $(el);
	  if (el.visible(true)) {
		el.addClass("already-visible"); 
	  } 
	});

	win.scroll(function(event) {
	  
	  allModsAnimate.each(function(i, el) {
		var el = $(el);
		if (el.visible(true)) {
		  el.numinate('start'); 
		} 
	  });
	  
	});		
	

	
	if ($.browser.msie && $.browser.version == 10) {
	  $("html").addClass("ie ie10");
	}

	if ($.browser.msie && $.browser.version == 9) {
	  $("html").addClass("ie ie9");
	}

	if ($.browser.msie && $.browser.version == 8) {
	  $("html").addClass("ie ie8");
	}

	if(navigator.platform.toUpperCase().indexOf('MAC')>=0) {
		$("html").addClass("sentient-mac");
	}
	
});


  
