text:
<?php

function front_end_slider($images, $paramssld, $slider)
{
 ob_start();
 if(isset($slider)) {
	$sliderID=$slider[0]->id;
	$slidertitle=$slider[0]->name;
	$sliderheight=$slider[0]->sl_height;
	$sliderwidth=$slider[0]->sl_width;
	$slidereffect=$slider[0]->slider_list_effects_s;
	$slidepausetime=($slider[0]->description+$slider[0]->param);
	$sliderpauseonhover=$slider[0]->pause_on_hover;
	$sliderposition=$slider[0]->sl_position;
	$slidechangespeed=$slider[0]->param;
	$sliderloadingicon=$slider[0]->sl_loading_icon;
	$sliderthumbslider=$slider[0]->show_thumb;

	$slideshow_title_position = explode('-', trim($paramssld['slider_title_position']));
	$slideshow_description_position = explode('-', trim($paramssld['slider_description_position']));
 }
	$hasyoutube=false;
	$hasvimeo=false;
	foreach ($images as $key => $image_row) {
		if(strpos($image_row->image_url,'youtube') !== false || strpos($image_row->image_url,'youtu.be') !== false){$hasyoutube=true;}
		if(strpos($image_row->image_url,'vimeo') !== false){$hasvimeo=true;}
	}
?>
<?php
$GLOBALS['pause_time']=$slidepausetime;
$GLOBALS['thumbnail_width']=$sliderwidth;
$GLOBALS['changespeed']=$slider[0]->param;
?>
<script>
	var huge_video_playing={};
	var autoplayMatch={};

</script>

<?php if ($hasvimeo==true){?>
<script src="<?php echo plugins_url( 'js/vimeo.lib.js' , __FILE__ ) ?>"></script>
<script src="https://f.vimeocdn.com/js/froogaloop2.min.js "></script>
<script>
jQuery(function(){
	var vimeoPlayer = document.querySelector('iframe');

	var volumes = [];
	var colors = [];
	var i=0;
	<?php
	$i=0;
	//$vimeoparams=array_reverse($images);
	foreach ($images as $key => $image_row) {	if($image_row->sl_type=="video" and strpos($image_row->image_url,'vimeo') !== false){?>
		volumes[<?php echo $i; ?>] = '<?php echo intval($image_row->description)/100; ?>';
		colors[<?php echo $i; ?>] = '<?php echo $image_row->link_target; ?>';
	<?php $i++;}	} ?>

	jQuery('iframe').each(function(){
				Froogaloop(this).addEvent('ready', ready);
	});
	jQuery(".sidedock,.controls").remove();
	function ready(player_id) {

		froogaloop = $f(player_id);

		function setupEventListeners() {
			function setVideoVolume(player_id,value) {
				Froogaloop(player_id).api('setVolume',value);
			}
			function setVideoColor(player_id,value) {
				Froogaloop(player_id).api('setColor',value);
			}
			function onPlay() {
				froogaloop.addEvent('play',
				function(){
					huge_video_playing['video_is_playing_'+<?php echo $sliderID; ?>]=true;
				});
			}
			function onPause() {
				froogaloop.addEvent('pause',
				function(){
					huge_video_playing['video_is_playing_'+<?php echo $sliderID; ?>]=false;
				});
			}
			function stopVimeoVideo(player){
				Froogaloop(player).api('pause');
			}
			setVideoVolume(player_id,volumes[i]);
			setVideoColor(player_id,colors[i]);
			i++;

			onPlay();
			onPause();
			jQuery('#huge_it_slideshow_left_<?php echo $sliderID; ?>, #huge_it_slideshow_right_<?php echo $sliderID; ?>,.huge_it_slideshow_dots_<?php echo $sliderID; ?>').click(function(){
				stopVimeoVideo(player_id);
			});
		}
		setupEventListeners();
	}
});
</script>
<?php } ?>

<?php if ($hasyoutube==true){?>

<script src="<?php echo plugins_url( 'js/youtube.lib.js' , __FILE__ ) ?>"></script>
<script>
  <?php
  function get_youtube_id_from_url($url){
		if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match)) {
			return $match[1];
		}
	}

	$i=0;
	 foreach ($images as $key => $image_row) {
		if($image_row->sl_type=="video" and strpos($image_row->image_url,'youtu') !== false){
  ?>
		var player_<?php echo $image_row->id; ?>;
<?php
		}else if (strpos($image_row->image_url,'vimeo') !== false){ ?>

<?php
		}else{continue;}
		$i++;
	}
?>
		huge_video_playing['video_is_playing_'+<?php echo $sliderID; ?>]=false;
		function onYouTubeIframeAPIReady() {
			<?php
			foreach ($images as $key => $image_row) {?>

				<?php if($image_row->sl_type=="video" and strpos($image_row->image_url,'youtube') !== false){
			?>
				player_<?php echo $image_row->id; ?> = new YT.Player('video_id_<?php echo $sliderID; ?>_<?php echo $key;?>', {
				  height: '<?php echo $sliderheight; ?>',
				  width: '<?php echo $sliderwidth; ?>',
				  videoId: '<?php echo get_youtube_id_from_url($image_row->image_url); ?>',
				   playerVars: {
					'controls': <?php if ($images[$key]->sl_url=="on"){ echo 1;}else{echo 0;} ?>,
					'showinfo': <?php if ($images[$key]->link_target=="on"){ echo 1;}else{echo 0;} ?>,
					'rel':0
				  },
				  events: {
					'onReady': onPlayerReady_<?php echo $image_row->id; ?>,
					'onStateChange': onPlayerStateChange_<?php echo $image_row->id; ?>,
					'loop':1
				  }
				});
			<?php
				}else{continue;}
			}
			?>
		}

<?php
	foreach ($images as $key => $image_row) {
		if($image_row->sl_type=="video" and strpos($image_row->image_url,'youtu') !== false){
?>
		  function onPlayerReady_<?php echo $image_row->id; ?>(event) {
			 player_<?php echo $image_row->id; ?>.setVolume(<?php echo $images[$key]->description; ?>);
		  }

		  function onPlayerStateChange_<?php echo $image_row->id; ?>(event) {
			//(event.data);

   //jQuery("iframe[class^='huge_it_video_frame_']")[myid].src;

			if (event.data == YT.PlayerState.PLAYING) {
				event.target.setPlaybackQuality('<?php echo $images[$key]->name; ?>');
				huge_video_playing['video_is_playing_'+<?php echo $sliderID; ?>]=true;

			}
			else if(event.data == YT.PlayerState.PAUSED){
				huge_video_playing['video_is_playing_'+<?php echo $sliderID; ?>]=false;

			}
		  }
<?php
	    }else{continue;}

	}
?>
	function stopYoutubeVideo() {
		<?php
		$i=0;
		foreach ($images as $key => $image_row) {
			if($image_row->sl_type=="video" and strpos($image_row->image_url,'youtube') !== false){
		?>
			player_<?php echo $image_row->id; ?>.pauseVideo();
		<?php
			}else{continue;}
				$i++;
			}
		?>
	}

</script>
<?php } ?>

<script>

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

  $('.thumb_wrapper').on('click', function(ev) {
  	var hugeid=$(this).data('rowid');
  	var myid=hugeid;
  	myid=parseInt(myid);
  	eval('player_'+myid+'.playVideo()')
   ev.preventDefault();

  });
});

	if(typeof sliderID_array =="undefined"){
		var sliderID_array=[];
	}

	var data_<?php echo $sliderID; ?> = [];
	var event_stack_<?php echo $sliderID; ?> = [];
	huge_video_playing['video_is_playing_'+<?php echo $sliderID; ?>]=false;
	<?php

                $args = array(
                'numberposts' => 10,
                'offset' => 0,
                'category' => 0,
                'orderby' => 'post_date',
                'order' => 'DESC',
                'post_type' => 'post',
                'post_status' => 'draft, publish, future, pending, private',
                'suppress_filters' => true );
	//	$images=array_reverse($images);
		$recent_posts = wp_get_recent_posts( $args, ARRAY_A );

		$i=0;

		foreach($images as $image){
			  	$imagerowstype=$image->sl_type;
				if($image->sl_type == ''){
				$imagerowstype='image';
				}
				switch($imagerowstype){

					case 'image':
						echo 'data_'.$sliderID.'["'.$i.'"]=[];';
						echo 'data_'.$sliderID.'["'.$i.'"]["id"]="'.$i.'";';
						echo 'data_'.$sliderID.'["'.$i.'"]["image_url"]="'.$image->image_url.'";';

						$strdesription=str_replace('"',"'",$image->description);
						$strdesription=preg_replace( "/\r|\n/", " ", $strdesription );
						echo 'data_'.$sliderID.'["'.$i.'"]["description"]="'.$strdesription.'";';

						$stralt=str_replace('"',"'",$image->name);
						$stralt=preg_replace( "/\r|\n/", " ", $stralt );
						echo 'data_'.$sliderID.'["'.$i.'"]["alt"]="'.$stralt.'";';
						$i++;
					break;

					case 'video':
						echo 'data_'.$sliderID.'["'.$i.'"]=[];';
						echo 'data_'.$sliderID.'["'.$i.'"]["id"]="'.$i.'";';
						echo 'data_'.$sliderID.'["'.$i.'"]["image_url"]="'.$image->image_url.'";';

						$strdesription=str_replace('"',"'",$image->description);
						$strdesription=preg_replace( "/\r|\n/", " ", $strdesription );
						echo 'data_'.$sliderID.'["'.$i.'"]["description"]="'.$strdesription.'";';

						$stralt=str_replace('"',"'",$image->name);
						$stralt=preg_replace( "/\r|\n/", " ", $stralt );
						echo 'data_'.$sliderID.'["'.$i.'"]["alt"]="'.$stralt.'";';
						$i++;
					break;

					case 'last_posts':

                                        $keyForStoping = 0;
					foreach($recent_posts as $keyl => $recentimage){
                                            if($image->name == "0"){
                                                if(get_the_post_thumbnail($recentimage["ID"], 'thumbnail') != ''){
                                                        if($keyl < $image->sl_url){
                                                            echo 'data_'.$sliderID.'["'.$i.'"]=[];';
                                                            echo 'data_'.$sliderID.'["'.$i.'"]["id"]="'.$i.'";';
                                                            echo 'data_'.$sliderID.'["'.$i.'"]["image_url"]="'.$recentimage['guid'].'";';

                                                            $strdesription=str_replace('"',"'",$recentimage['post_content']);
                                                            $strdesription=preg_replace( "/\r|\n/", " ", $strdesription );
                                                            $strdesription=substr_replace($strdesription, "",$image->description);
                                                            echo 'data_'.$sliderID.'["'.$i.'"]["description"]="'.$strdesription.'";';

                                                            $stralt=str_replace('"',"'",$recentimage['post_title']);
                                                            $stralt=preg_replace( "/\r|\n/", " ", $stralt );
                                                            echo 'data_'.$sliderID.'["'.$i.'"]["alt"]="'.$stralt.'";';
                                                            $i++;
                                                        }
                                                    }
                                            }
                                            else{
                                                $category_id = get_cat_ID($image->name);                            //       USER CHOOSED CATEGORY
                                                $category_id_from_posts = wp_get_post_categories($recentimage['ID']);    //       GETTING ALL CATEGORIES FOR THIS POST
                                                if($keyForStoping < $image->sl_url){
                                                    if (in_array($category_id, $category_id_from_posts)){
                                                        if(get_the_post_thumbnail($recentimage["ID"], 'thumbnail') != ''){
                                                            $keyForStoping++;
    //                                                        if($keyl < $image->sl_url){
                                                                echo 'data_'.$sliderID.'["'.$i.'"]=[];';
                                                                echo 'data_'.$sliderID.'["'.$i.'"]["id"]="'.$i.'";';
                                                                echo 'data_'.$sliderID.'["'.$i.'"]["image_url"]="'.$recentimage['guid'].'";';

                                                                $strdesription=str_replace('"',"'",$recentimage['post_content']);
                                                                $strdesription=preg_replace( "/\r|\n/", " ", $strdesription );
                                                                $strdesription=substr_replace($strdesription, "",$image->description);
                                                                echo 'data_'.$sliderID.'["'.$i.'"]["description"]="'.$strdesription.'";';

                                                                $stralt=str_replace('"',"'",$recentimage['post_title']);
                                                                $stralt=preg_replace( "/\r|\n/", " ", $stralt );
                                                                echo 'data_'.$sliderID.'["'.$i.'"]["alt"]="'.$stralt.'";';
                                                                $i++;
    //                                                        }
                                                        }
                                                    }
                                                }
                                            }

					}

					break;
			}

		}
	?>

      var huge_it_trans_in_progress_<?php echo $sliderID; ?> = false;
      var huge_it_transition_duration_<?php echo $sliderID; ?> = <?php echo $slidechangespeed;?>;
      var huge_interval ={};
      var id_array_index=sliderID_array.length

	  <?php
	  		$huge_sliderId='';
	  		if(isset($huge_sliderId)){
	  		$huge_sliderId=$huge_sliderId;
		  	}else{
		  		$huge_sliderId='';
		  	}
		  	if($huge_sliderId==';'){
		  		$huge_sliderId='';
		  	}
	  if($slider[0]->show_thumb =='thumbnails'){
	  		$huge_sliderId=$slider[0]->id;
	  	}

	  	?>

	  var ifhasthumb ="<?php echo $sliderthumbslider; ?>";
	  sliderID_array[id_array_index] = <?php echo $huge_sliderId; ?>
      // Stop autoplay.
      window.clearInterval(huge_interval['huge_it_playInterval_'+<?php echo $sliderID; ?>]);

     var huge_it_current_key_<?php echo $sliderID; ?> = '<?php echo (isset($current_key) ? $current_key : ''); ?>';
	 function huge_it_move_dots_<?php echo $sliderID; ?>() {
        var image_left = jQuery(".huge_it_slideshow_dots_active_<?php echo $sliderID; ?>").position().left;
        var image_right = jQuery(".huge_it_slideshow_dots_active_<?php echo $sliderID; ?>").position().left + jQuery(".huge_it_slideshow_dots_active_<?php echo $sliderID; ?>").outerWidth(true);

      }
      function huge_it_testBrowser_cssTransitions_<?php echo $sliderID; ?>() {
        return huge_it_testDom_<?php echo $sliderID; ?>('Transition');
      }
      function huge_it_testBrowser_cssTransforms3d_<?php echo $sliderID; ?>() {
        return huge_it_testDom_<?php echo $sliderID; ?>('Perspective');
      }
      function huge_it_testDom_<?php echo $sliderID; ?>(prop) {
        // Browser vendor CSS prefixes.
        var browserVendors = ['', '-webkit-', '-moz-', '-ms-', '-o-', '-khtml-'];
        // Browser vendor DOM prefixes.
        var domPrefixes = ['', 'Webkit', 'Moz', 'ms', 'O', 'Khtml'];
        var i = domPrefixes.length;
        while (i--) {
          if (typeof document.body.style[domPrefixes[i] + prop] !== 'undefined') {
            return true;
          }
        }
        return false;
      }
		function huge_it_cube_<?php echo $sliderID; ?>(tz, ntx, nty, nrx, nry, wrx, wry, current_image_class, next_image_class, direction) {

        /* If browser does not support 3d transforms/CSS transitions.*/
        if (!huge_it_testBrowser_cssTransitions_<?php echo $sliderID; ?>()) {
			jQuery(".huge_it_slideshow_dots_<?php echo $sliderID; ?>").removeClass("huge_it_slideshow_dots_active_<?php echo $sliderID; ?>").addClass("huge_it_slideshow_dots_deactive_<?php echo $sliderID; ?>");
        jQuery("#huge_it_dots_" + huge_it_current_key_<?php echo $sliderID; ?> + "_<?php echo $sliderID; ?>").removeClass("huge_it_slideshow_dots_deactive_<?php echo $sliderID; ?>").addClass("huge_it_slideshow_dots_active_<?php echo $sliderID; ?>");
          return huge_it_fallback_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction);
        }
        if (!huge_it_testBrowser_cssTransforms3d_<?php echo $sliderID; ?>()) {
          return huge_it_fallback3d_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction);
        }
			//alert(current_image_class+' '+next_image_class);
		  jQuery(current_image_class).css({'z-index': 'none'});
          jQuery(next_image_class).css({'z-index' : 2});
        huge_it_trans_in_progress_<?php echo $sliderID; ?> = true;
        /* Set active thumbnail.*/
		jQuery(".huge_it_slideshow_dots_<?php echo $sliderID; ?>").removeClass("huge_it_slideshow_dots_active_<?php echo $sliderID; ?>").addClass("huge_it_slideshow_dots_deactive_<?php echo $sliderID; ?>");
		jQuery("#huge_it_dots_" + huge_it_current_key_<?php echo $sliderID; ?> + "_<?php echo $sliderID; ?>").removeClass("huge_it_slideshow_dots_deactive_<?php echo $sliderID; ?>").addClass("huge_it_slideshow_dots_active_<?php echo $sliderID; ?>");
        jQuery(".huge_it_slide_bg_<?php echo $sliderID; ?>").css('perspective', 1000);
        jQuery(current_image_class).css({
          transform : 'translateZ(' + tz + 'px)',
          backfaceVisibility : 'hidden'
        });

		 jQuery(".huge_it_slideshow_image_wrap_<?php echo $sliderID; ?>,.huge_it_slide_bg_<?php echo $sliderID; ?>,.huge_it_slideshow_image_item_<?php echo $sliderID; ?>,.huge_it_slideshow_image_second_item_<?php echo $sliderID; ?> ").css('overflow', 'visible');

        jQuery(next_image_class).css({
          opacity : 1,
          filter: 'Alpha(opacity=100)',
          backfaceVisibility : 'hidden',
          transform : 'translateY(' + nty + 'px) translateX(' + ntx + 'px) rotateY('+ nry +'deg) rotateX('+ nrx +'deg)'
        });
        jQuery(".huge_it_slider_<?php echo $sliderID; ?>").css({
          transform: 'translateZ(-' + tz + 'px)',
          transformStyle: 'preserve-3d'
        });
        /* Execution steps.*/
        setTimeout(function () {
          jQuery(".huge_it_slider_<?php echo $sliderID; ?>").css({
            transition: 'all ' + huge_it_transition_duration_<?php echo $sliderID; ?> + 'ms ease-in-out',
            transform: 'translateZ(-' + tz + 'px) rotateX('+ wrx +'deg) rotateY('+ wry +'deg)'
          });
        }, 20);
        /* After transition.*/
        jQuery(".huge_it_slider_<?php echo $sliderID; ?>").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(huge_it_after_trans));
        function huge_it_after_trans() {
          /*if (huge_it_from_focus_<?php echo $sliderID; ?>) {
            huge_it_from_focus_<?php echo $sliderID; ?> = false;
            return;
          }*/
		  jQuery(".huge_it_slide_bg_<?php echo $sliderID; ?>,.huge_it_slideshow_image_item_<?php echo $sliderID; ?>,.huge_it_slideshow_image_second_item_<?php echo $sliderID; ?> ").css('overflow', 'hidden');
		  jQuery(".huge_it_slide_bg_<?php echo $sliderID; ?>").removeAttr('style');
          jQuery(current_image_class).removeAttr('style');
          jQuery(next_image_class).removeAttr('style');
          jQuery(".huge_it_slider_<?php echo $sliderID; ?>").removeAttr('style');
		 // alert(current_image_class+' '+next_image_class);
          jQuery(current_image_class).css({'opacity' : 0, filter: 'Alpha(opacity=0)', 'z-index': 1});
          jQuery(next_image_class).css({'opacity' : 1, filter: 'Alpha(opacity=100)', 'z-index' : 2});
         // huge_it_change_watermark_container_<?php echo $sliderID; ?>();
          huge_it_trans_in_progress_<?php echo $sliderID; ?> = false;
          if (typeof event_stack_<?php echo $sliderID; ?> !== 'undefined' && event_stack_<?php echo $sliderID; ?>.length > 0) {
            key = event_stack_<?php echo $sliderID; ?>[0].split("-");
            event_stack_<?php echo $sliderID; ?>.shift();
            huge_it_change_image_<?php echo $sliderID; ?>(key[0], key[1], data_<?php echo $sliderID; ?>, true,false);
          }
        }
      }
      function huge_it_cubeH_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        /* Set to half of image width.*/
        var dimension = jQuery(current_image_class).width() / 2;
        if (direction == 'right') {
          huge_it_cube_<?php echo $sliderID; ?>(dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction);
        }
        else if (direction == 'left') {
          huge_it_cube_<?php echo $sliderID; ?>(dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction);
        }
      }
      function huge_it_cubeV_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        /* Set to half of image height.*/
        var dimension = jQuery(current_image_class).height() / 2;
        /* If next slide.*/
        if (direction == 'right') {
          huge_it_cube_<?php echo $sliderID; ?>(dimension, 0, -dimension, 90, 0, -90, 0, current_image_class, next_image_class, direction);
        }
        else if (direction == 'left') {
          huge_it_cube_<?php echo $sliderID; ?>(dimension, 0, dimension, -90, 0, 90, 0, current_image_class, next_image_class, direction);
        }
      }
      /* For browsers that does not support transitions.*/
      function huge_it_fallback_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        huge_it_fade_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction);
      }
      /* For browsers that support transitions, but not 3d transforms (only used if primary transition makes use of 3d-transforms).*/
      function huge_it_fallback3d_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        huge_it_sliceV_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction);
      }
      function huge_it_none_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
        jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});

        /* Set active thumbnail.*/
        jQuery(".huge_it_slideshow_dots_<?php echo $sliderID; ?>").removeClass("huge_it_slideshow_dots_active_<?php echo $sliderID; ?>").addClass("huge_it_slideshow_dots_deactive_<?php echo $sliderID; ?>");
        jQuery("#huge_it_dots_" + huge_it_current_key_<?php echo $sliderID; ?> + "_<?php echo $sliderID; ?>").removeClass("huge_it_slideshow_dots_deactive_<?php echo $sliderID; ?>").addClass("huge_it_slideshow_dots_active_<?php echo $sliderID; ?>");
      }
      function huge_it_fade_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
		if (huge_it_testBrowser_cssTransitions_<?php echo $sliderID; ?>()) {

          jQuery(next_image_class).css('transition', 'opacity ' + huge_it_transition_duration_<?php echo $sliderID; ?> + 'ms linear');
		  jQuery(current_image_class).css('transition', 'opacity ' + huge_it_transition_duration_<?php echo $sliderID; ?> + 'ms linear');
          jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
          jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
        }
        else {

          jQuery(current_image_class).animate({'opacity' : 0, 'z-index' : 1}, huge_it_transition_duration_<?php echo $sliderID; ?>);
          jQuery(next_image_class).animate({
              'opacity' : 1,
              'z-index': 2
            }, {
              duration: huge_it_transition_duration_<?php echo $sliderID; ?>,
              complete: function () {return false;}
            });
          // For IE.
          jQuery(current_image_class).fadeTo(huge_it_transition_duration_<?php echo $sliderID; ?>, 0);
          jQuery(next_image_class).fadeTo(huge_it_transition_duration_<?php echo $sliderID; ?>, 1);
        }

		jQuery(".huge_it_slideshow_dots_<?php echo $sliderID; ?>").removeClass("huge_it_slideshow_dots_active_<?php echo $sliderID; ?>").addClass("huge_it_slideshow_dots_deactive_<?php echo $sliderID; ?>");
		jQuery("#huge_it_dots_" + huge_it_current_key_<?php echo $sliderID; ?> + "_<?php echo $sliderID; ?>").removeClass("huge_it_slideshow_dots_deactive_<?php echo $sliderID; ?>").addClass("huge_it_slideshow_dots_active_<?php echo $sliderID; ?>");
      }
      function huge_it_grid_<?php echo $sliderID; ?>(cols, rows, ro, tx, ty, sc, op, current_image_class, next_image_class, direction) {
        /* If browser does not support CSS transitions.*/
        if (!huge_it_testBrowser_cssTransitions_<?php echo $sliderID; ?>()) {
			jQuery(".huge_it_slideshow_dots_<?php echo $sliderID; ?>").removeClass("huge_it_slideshow_dots_active_<?php echo $sliderID; ?>").addClass("huge_it_slideshow_dots_deactive_<?php echo $sliderID; ?>");
        jQuery("#huge_it_dots_" + huge_it_current_key_<?php echo $sliderID; ?> + "_<?php echo $sliderID; ?>").removeClass("huge_it_slideshow_dots_deactive_<?php echo $sliderID; ?>").addClass("huge_it_slideshow_dots_active_<?php echo $sliderID; ?>");
          return huge_it_fallback_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction);

        }
        huge_it_trans_in_progress_<?php echo $sliderID; ?> = true;
        /* Set active thumbnail.*/
		jQuery(".huge_it_slideshow_dots_<?php echo $sliderID; ?>").removeClass("huge_it_slideshow_dots_active_<?php echo $sliderID; ?>").addClass("huge_it_slideshow_dots_deactive_<?php echo $sliderID; ?>");
        jQuery("#huge_it_dots_" + huge_it_current_key_<?php echo $sliderID; ?> + "_<?php echo $sliderID; ?>").removeClass("huge_it_slideshow_dots_deactive_<?php echo $sliderID; ?>").addClass("huge_it_slideshow_dots_active_<?php echo $sliderID; ?>");
        /* The time (in ms) added to/subtracted from the delay total for each new gridlet.*/
        var count = (huge_it_transition_duration_<?php echo $sliderID; ?>) / (cols + rows);
        /* Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)*/
        function huge_it_gridlet(width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) {
          var delay = (c + r) * count;
          /* Return a gridlet elem with styles for specific transition.*/
          return jQuery('<div class="huge_it_gridlet_<?php echo $sliderID; ?>" />').css({
            width : width,
            height : height,
            top : top,
            left : left,
            backgroundImage : 'url("' + src + '")',
            backgroundColor: jQuery(".huge_it_slideshow_image_wrap_<?php echo $sliderID; ?>").css("background-color"),
            /*backgroundColor: rgba(0, 0, 0, 0),*/
            backgroundRepeat: 'no-repeat',
            backgroundPosition : img_left + 'px ' + img_top + 'px',
            backgroundSize : imgWidth + 'px ' + imgHeight + 'px',
            transition : 'all ' + huge_it_transition_duration_<?php echo $sliderID; ?> + 'ms ease-in-out ' + delay + 'ms',
            transform : 'none'
          });
        }
        /* Get the current slide's image.*/
        var cur_img = jQuery(current_image_class).find('img');
        /* Create a grid to hold the gridlets.*/
        var grid = jQuery('<div />').addClass('huge_it_grid_<?php echo $sliderID; ?>');
        /* Prepend the grid to the next slide (i.e. so it's above the slide image).*/
        jQuery(current_image_class).prepend(grid);
        /* vars to calculate positioning/size of gridlets*/
        var cont = jQuery(".huge_it_slide_bg_<?php echo $sliderID; ?>");
        var imgWidth = cur_img.width();
        var imgHeight = cur_img.height();
        var contWidth = cont.width(),
            contHeight = cont.height(),
            imgSrc = cur_img.attr('src'),/*.replace('/thumb', ''),*/
            colWidth = Math.floor(contWidth / cols),
            rowHeight = Math.floor(contHeight / rows),
            colRemainder = contWidth - (cols * colWidth),
            colAdd = Math.ceil(colRemainder / cols),
            rowRemainder = contHeight - (rows * rowHeight),
            rowAdd = Math.ceil(rowRemainder / rows),
            leftDist = 0,
            img_leftDist = (jQuery(".huge_it_slide_bg_<?php echo $sliderID; ?>").width() - cur_img.width()) / 2;
        /* tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).*/
        tx = tx === 'auto' ? contWidth : tx;
        tx = tx === 'min-auto' ? - contWidth : tx;
        ty = ty === 'auto' ? contHeight : ty;
        ty = ty === 'min-auto' ? - contHeight : ty;
        /* Loop through cols*/
        for (var i = 0; i < cols; i++) {
          var topDist = 0,
              img_topDst = (jQuery(".huge_it_slide_bg_<?php echo $sliderID; ?>").height() - cur_img.height()) / 2,
              newColWidth = colWidth;
          /* If imgWidth (px) does not divide cleanly into the specified number of cols, adjust individual col widths to create correct total.*/
          if (colRemainder > 0) {
            var add = colRemainder >= colAdd ? colAdd : colRemainder;
            newColWidth += add;
            colRemainder -= add;
          }
          /* Nested loop to create row gridlets for each col.*/
          for (var j = 0; j < rows; j++)  {
            var newRowHeight = rowHeight,
                newRowRemainder = rowRemainder;
            /* If contHeight (px) does not divide cleanly into the specified number of rows, adjust individual row heights to create correct total.*/
            if (newRowRemainder > 0) {
              add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder;
              newRowHeight += add;
              newRowRemainder -= add;
            }
            /* Create & append gridlet to grid.*/
            grid.append(huge_it_gridlet(newColWidth, newRowHeight, topDist, img_topDst, leftDist, img_leftDist, imgSrc, imgWidth, imgHeight, i, j));
            topDist += newRowHeight;
            img_topDst -= newRowHeight;
          }
          img_leftDist -= newColWidth;
          leftDist += newColWidth;
        }
        /* Set event listener on last gridlet to finish transitioning.*/
        var last_gridlet = grid.children().last();
        /* Show grid & hide the image it replaces.*/
        grid.show();
        cur_img.css('opacity', 0);
        /* Add identifying classes to corner gridlets (useful if applying border radius).*/
        grid.children().first().addClass('rs-top-left');
        grid.children().last().addClass('rs-bottom-right');
        grid.children().eq(rows - 1).addClass('rs-bottom-left');
        grid.children().eq(- rows).addClass('rs-top-right');
        /* Execution steps.*/
        setTimeout(function () {
          grid.children().css({
            opacity: op,
            transform: 'rotate('+ ro +'deg) translateX('+ tx +'px) translateY('+ ty +'px) scale('+ sc +')'
          });
        }, 1);
        jQuery(next_image_class).css('opacity', 1);
        /* After transition.*/
        jQuery(last_gridlet).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(huge_it_after_trans));
        function huge_it_after_trans() {
          jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1});
          jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2});
          cur_img.css('opacity', 1);
          grid.remove();
          huge_it_trans_in_progress_<?php echo $sliderID; ?> = false;
          if (typeof event_stack_<?php echo $sliderID; ?> !== 'undefined' && event_stack_<?php echo $sliderID; ?>.length > 0) {
            key = event_stack_<?php echo $sliderID; ?>[0].split("-");
            event_stack_<?php echo $sliderID; ?>.shift();
            huge_it_change_image_<?php echo $sliderID; ?>(key[0], key[1], data_<?php echo $sliderID; ?>, true,false);
          }
        }
      }
      function huge_it_sliceH_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        if (direction == 'right') {
          var translateX = 'min-auto';
        }
        else if (direction == 'left') {
          var translateX = 'auto';
        }
        huge_it_grid_<?php echo $sliderID; ?>(1, 8, 0, translateX, 0, 1, 0, current_image_class, next_image_class, direction);
      }
      function huge_it_sliceV_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        if (direction == 'right') {
          var translateY = 'min-auto';
        }
        else if (direction == 'left') {
          var translateY = 'auto';
        }
        huge_it_grid_<?php echo $sliderID; ?>(10, 1, 0, 0, translateY, 1, 0, current_image_class, next_image_class, direction);
      }
      function huge_it_slideV_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        if (direction == 'right') {
          var translateY = 'auto';
        }
        else if (direction == 'left') {
          var translateY = 'min-auto';
        }
        huge_it_grid_<?php echo $sliderID; ?>(1, 1, 0, 0, translateY, 1, 1, current_image_class, next_image_class, direction);
      }
      function huge_it_slideH_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        if (direction == 'right') {
          var translateX = 'min-auto';
        }
        else if (direction == 'left') {
          var translateX = 'auto';
        }
        huge_it_grid_<?php echo $sliderID; ?>(1, 1, 0, translateX, 0, 1, 1, current_image_class, next_image_class, direction);
      }
      function huge_it_scaleOut_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        huge_it_grid_<?php echo $sliderID; ?>(1, 1, 0, 0, 0, 1.5, 0, current_image_class, next_image_class, direction);
      }
      function huge_it_scaleIn_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        huge_it_grid_<?php echo $sliderID; ?>(1, 1, 0, 0, 0, 0.5, 0, current_image_class, next_image_class, direction);
      }
      function huge_it_blockScale_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        huge_it_grid_<?php echo $sliderID; ?>(8, 6, 0, 0, 0, .6, 0, current_image_class, next_image_class, direction);
      }
      function huge_it_kaleidoscope_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        huge_it_grid_<?php echo $sliderID; ?>(10, 8, 0, 0, 0, 1, 0, current_image_class, next_image_class, direction);
      }
      function huge_it_fan_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        if (direction == 'right') {
          var rotate = 45;
          var translateX = 100;
        }
        else if (direction == 'left') {
          var rotate = -45;
          var translateX = -100;
        }
        huge_it_grid_<?php echo $sliderID; ?>(1, 10, rotate, translateX, 0, 1, 0, current_image_class, next_image_class, direction);
      }
      function huge_it_blindV_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        huge_it_grid_<?php echo $sliderID; ?>(1, 8, 0, 0, 0, .7, 0, current_image_class, next_image_class);
      }
      function huge_it_blindH_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        huge_it_grid_<?php echo $sliderID; ?>(10, 1, 0, 0, 0, .7, 0, current_image_class, next_image_class);
      }
      function huge_it_random_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction) {
        var anims = ['sliceH', 'sliceV', 'slideH', 'slideV', 'scaleOut', 'scaleIn', 'blockScale', 'kaleidoscope', 'fan', 'blindH', 'blindV'];
        /* Pick a random transition from the anims array.*/
        this["huge_it_" + anims[Math.floor(Math.random() * anims.length)] + "_<?php echo $sliderID; ?>"](current_image_class, next_image_class, direction);
      }

      function iterator_<?php echo $sliderID; ?>() {
        var iterator = 1;

        return iterator;
     }

     function huge_it_change_image_<?php echo $sliderID; ?>(current_key, key, data_<?php echo $sliderID; ?>, from_effect,clicked) {

        if (data_<?php echo $sliderID; ?>[key]) {

			if(huge_video_playing['video_is_playing_'+<?php echo $sliderID; ?>] && !clicked){
				return false;
			}

          if (!from_effect) {
            // Change image key.
            jQuery("#huge_it_current_image_key_<?php echo $sliderID; ?>").val(key);
             // if (current_key == '-2') { /* Dots.*/
				current_key = jQuery(".huge_it_slideshow_dots_active_<?php echo $sliderID; ?>").attr("data-image_key");
			//  }
          }

          if (huge_it_trans_in_progress_<?php echo $sliderID; ?>) {
			//errorlogjQuery(".huge_it_slideshow_image_wrap_<?php echo $sliderID; ?>").after(" --IN TRANSACTION-- <br />");
            event_stack_<?php echo $sliderID; ?>.push(current_key + '-' + key);
            return;
          }

          var direction = 'right';
          if (huge_it_current_key_<?php echo $sliderID; ?> > key) {
            var direction = 'left';
          }
          else if (huge_it_current_key_<?php echo $sliderID; ?> == key) {
            return false;
          }

          // Set active thumbnail position.

          huge_it_current_key_<?php echo $sliderID; ?> = key;
          //Change image id, title, description.
          jQuery("#huge_it_slideshow_image_<?php echo $sliderID; ?>").attr('data-image_id', data_<?php echo $sliderID; ?>[key]["id"]);

		  jQuery(".huge_it_slideshow_title_text_<?php echo $sliderID; ?>").html(data_<?php echo $sliderID; ?>[key]["alt"]);
          jQuery(".huge_it_slideshow_description_text_<?php echo $sliderID; ?>").html(data_<?php echo $sliderID; ?>[key]["description"]);

		  var current_image_class = "#image_id_<?php echo $sliderID; ?>_" + data_<?php echo $sliderID; ?>[current_key]["id"];
          var next_image_class = "#image_id_<?php echo $sliderID; ?>_" + data_<?php echo $sliderID; ?>[key]["id"];

		 if(jQuery(current_image_class).find('.huge_it_video_frame_<?php echo $sliderID; ?>').length>0) {
			var streffect='<?php echo $slidereffect; ?>';
			if(streffect=="cubeV" || streffect=="cubeH" || streffect=="none" || streffect=="fade"){
				huge_it_<?php echo $slidereffect; ?>_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction);
			}else{
				huge_it_fade_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction);
			}
		  }else{
				huge_it_<?php echo $slidereffect; ?>_<?php echo $sliderID; ?>(current_image_class, next_image_class, direction);
		  }

		jQuery('.huge_it_slideshow_title_text_<?php echo $sliderID; ?>').removeClass('none');
		if(jQuery('.huge_it_slideshow_title_text_<?php echo $sliderID; ?>').html()==""){jQuery('.huge_it_slideshow_title_text_<?php echo $sliderID; ?>').addClass('none');}

		jQuery('.huge_it_slideshow_description_text_<?php echo $sliderID; ?>').removeClass('none');
		if(jQuery('.huge_it_slideshow_description_text_<?php echo $sliderID; ?>').html()==""){jQuery('.huge_it_slideshow_description_text_<?php echo $sliderID; ?>').addClass('none');}

		  jQuery(current_image_class).find('.huge_it_slideshow_title_text_<?php echo $sliderID; ?>').addClass('none');
		  jQuery(current_image_class).find('.huge_it_slideshow_description_text_<?php echo $sliderID; ?>').addClass('none');

		  //errorlogjQuery(".huge_it_slideshow_image_wrap_<?php echo $sliderID; ?>").after("--cur-key="+current_key+" --cur-img-class="+current_image_class+" nxt-img-class="+next_image_class+"--");
			 huge_it_move_dots_<?php echo $sliderID; ?>();
			<?php foreach ($images as $key => $image_row) {if($image_row->sl_type=="video" and strpos($image_row->image_url,'youtube') !== false){	?>
				stopYoutubeVideo();
			<?php } } ?>
			window.clearInterval(huge_interval['huge_it_playInterval_'+<?php echo $sliderID; ?>]);
			play_<?php echo $sliderID; ?>();
        }

      }
	   var staticthumbWidth;
      jQuery(window).load(function(){
      	 staticthumbWidth=jQuery('#huge_it_thumb_slider>li').width()

      })
     function huge_it_popup_resize_<?php echo $sliderID; ?>() {

		var staticsliderwidth=<?php echo $sliderwidth;?>;
		var sliderwidth=<?php echo $sliderwidth;?>;

		var thumbWidth=jQuery(".huge_it_slideshow_thumbnails_<?php echo $sliderID; ?>").width();

		//alert(thumbHeight)
		//alert(thumbWidth/2)
		var bodyWidth=jQuery(window).width();
        var parentWidth = jQuery(".huge_it_slideshow_image_wrap_<?php echo $sliderID; ?>").parent().width();
		//if responsive js late responsive.js @  take body size and not parent div
		jQuery(".huge_it_slideshow_thumbnails_<?php echo $sliderID; ?>").css({height: <?php echo $paramssld['slider_thumb_height']; ?>});
		if(sliderwidth>parentWidth){sliderwidth=parentWidth;}
		if(sliderwidth>bodyWidth){sliderwidth=bodyWidth;}
		var str=(<?php echo $sliderheight;?>/staticsliderwidth);

			jQuery(".huge_it_slideshow_thumbnails_<?php echo $sliderID; ?>").css({width: thumbWidth});

				var str2=(<?php echo $paramssld['slider_thumb_height']; ?>/staticthumbWidth);

			jQuery(".huge_it_slideshow_thumbnails_<?php echo $sliderID; ?>").css({height: thumbWidth*str2});
			jQuery(".bx-viewport").css({height: thumbWidth*str2});

		jQuery(".huge_it_slideshow_image_wrap_<?php echo $sliderID; ?>").css({width: (sliderwidth)});
		jQuery(".huge_it_slideshow_image_wrap_<?php echo $sliderID; ?>").css({height: ((sliderwidth) * str)});

		jQuery(".huge_it_slideshow_image_container_<?php echo $sliderID; ?>").css({width: (sliderwidth)});
		jQuery(".huge_it_slideshow_image_container_<?php echo $sliderID; ?>").css({height: ((sliderwidth) * str)});

		if("<?php echo $slideshow_title_position[1]; ?>"=="middle"){var titlemargintopminus=jQuery(".huge_it_slideshow_title_text_<?php echo $sliderID; ?>").outerHeight()/2;}
		if("<?php echo $slideshow_title_position[0]; ?>"=="center"){var titlemarginleftminus=jQuery(".huge_it_slideshow_title_text_<?php echo $sliderID; ?>").outerWidth()/2;}
		jQuery(".huge_it_slideshow_title_text_<?php echo $sliderID; ?>").css({cssText: "margin-top:-" + titlemargintopminus + "px; margin-left:-"+titlemarginleftminus+"px;"});

		if("<?php echo $slideshow_description_position[1]; ?>"=="middle"){var descriptionmargintopminus=jQuery(".huge_it_slideshow_description_text_<?php echo $sliderID; ?>").outerHeight()/2;}
		if("<?php echo $slideshow_description_position[0]; ?>"=="center"){var descriptionmarginleftminus=jQuery(".huge_it_slideshow_description_text_<?php echo $sliderID; ?>").outerWidth()/2;}
		jQuery(".huge_it_slideshow_description_text_<?php echo $sliderID; ?>").css({cssText: "margin-top:-" + descriptionmargintopminus + "px; margin-left:-"+descriptionmarginleftminus+"px;"});
		        jQuery("#huge_it_loading_image_<?php echo $sliderID; ?>").css({display: "none"});
                jQuery(".huge_it_slideshow_image_wrap1_<?php echo $sliderID; ?>").css({display: "block"});
				jQuery(".huge_it_slideshow_image_wrap_<?php echo $sliderID; ?>").removeClass("nocolor");

		if("<?php echo $paramssld['slider_crop_image']; ?>"=="resize"){
			jQuery(".huge_it_slideshow_image_<?php echo $sliderID; ?>,  .huge_it_slideshow_image_container_<?php echo $sliderID; ?> img").css({
				cssText: "width:" + sliderwidth + "px; height:" + ((sliderwidth) * str)	+"px;"
			});
		}else {
			jQuery(".huge_it_slideshow_image_<?php echo $sliderID; ?>,.huge_it_slideshow_image_item2_<?php echo $sliderID; ?>").css({
			cssText: "max-width: " + sliderwidth + "px !important; max-height: " + (sliderwidth * str) + "px !important;"
		  });
		}

		jQuery('.huge_it_video_frame_<?php echo $sliderID; ?>').each(function (e) {
          jQuery(this).width(sliderwidth);
          jQuery(this).height(sliderwidth * str);
        });
      }

      jQuery(window).load(function () {
		jQuery(window).resize(function() {
			huge_it_popup_resize_<?php echo $sliderID; ?>();
		});

		jQuery('#huge_it_slideshow_left_<?php echo $sliderID; ?>').on('click',function(){
			huge_it_change_image_<?php echo $sliderID; ?>(parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()), (parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()) - iterator_<?php echo $sliderID; ?>()) >= 0 ? (parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()) - iterator_<?php echo $sliderID; ?>()) % data_<?php echo $sliderID; ?>.length : data_<?php echo $sliderID; ?>.length - 1, data_<?php echo $sliderID; ?>,false,true);
			return false;
		});

		jQuery('#huge_it_slideshow_right_<?php echo $sliderID; ?>').on('click',function(){
			huge_it_change_image_<?php echo $sliderID; ?>(parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()), (parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()) + iterator_<?php echo $sliderID; ?>()) % data_<?php echo $sliderID; ?>.length, data_<?php echo $sliderID; ?>,false,true);
			return false;
		});

		huge_it_popup_resize_<?php echo $sliderID; ?>();
        /* Disable right click.*/
        jQuery('div[id^="huge_it_container"]').bind("contextmenu", function () {
          return false;
        });

		/*HOVER SLIDESHOW*/
		jQuery("#huge_it_slideshow_image_container_<?php echo $sliderID; ?>, .huge_it_slideshow_image_container_<?php echo $sliderID; ?>, .huge_it_slideshow_dots_container_<?php echo $sliderID; ?>,#huge_it_slideshow_right_<?php echo $sliderID; ?>,#huge_it_slideshow_left_<?php echo $sliderID; ?>").hover(function(){
			//errorlogjQuery(".huge_it_slideshow_image_wrap_<?php echo $sliderID; ?>").after(" -- hover -- <br /> ");
			jQuery("#huge_it_slideshow_right_<?php echo $sliderID; ?>").css({'display':'inline'});
			jQuery("#huge_it_slideshow_left_<?php echo $sliderID; ?>").css({'display':'inline'});
		},function(){
			jQuery("#huge_it_slideshow_right_<?php echo $sliderID; ?>").css({'display':'none'});
			jQuery("#huge_it_slideshow_left_<?php echo $sliderID; ?>").css({'display':'none'});
		});
		var pausehover="<?php echo $sliderpauseonhover;?>";
		if(pausehover=="on"){
			jQuery("#huge_it_slideshow_image_container_<?php echo $sliderID; ?>, .huge_it_slideshow_image_container_<?php echo $sliderID; ?>").hover(function(){
				window.clearInterval(huge_interval['huge_it_playInterval_'+<?php echo $sliderID; ?>]);
			},function(){
				window.clearInterval(huge_interval['huge_it_playInterval_'+<?php echo $sliderID; ?>]);
				play_<?php echo $sliderID; ?>();
			});
		}
          play_<?php echo $sliderID; ?>();
      });
		//var huge_play={};

      function play_<?php echo $sliderID; ?>(){
        /* Play.*/
		//errorlogjQuery(".huge_it_slideshow_image_wrap_<?php echo $sliderID; ?>").after(" -- paly  ---- ");
        huge_interval['huge_it_playInterval_'+<?php echo $sliderID; ?>] = setInterval(function () {
			//errorlogjQuery(".huge_it_slideshow_image_wrap_<?php echo $sliderID; ?>").after(" -- time left ---- ");
          var iterator = 1;
          huge_it_change_image_<?php echo $sliderID; ?>(parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()), (parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()) + iterator) % data_<?php echo $sliderID; ?>.length, data_<?php echo $sliderID; ?>,false,false);
        }, '<?php echo $slidepausetime; ?>');
      }

      jQuery(window).focus(function() {
       /*event_stack_<?php echo $sliderID; ?> = [];*/
        var i_<?php echo $sliderID; ?> = 0;
        jQuery(".huge_it_slider_<?php echo $sliderID; ?>").children("div").each(function () {
          if (jQuery(this).css('opacity') == 1) {
            jQuery("#huge_it_current_image_key_<?php echo $sliderID; ?>").val(i_<?php echo $sliderID; ?>);
          }
          i_<?php echo $sliderID; ?>++;
        });
      });
      jQuery(window).blur(function() {
        event_stack_<?php echo $sliderID; ?> = [];
     //   window.clearInterval(huge_interval['huge_it_playInterval_'+<?php echo $sliderID; ?>]);
      });
    </script>
<style>
	.thumb_image{
		  position: absolute;
		  width: 100%;
		  height: 100%;
		  top: 0;
		  left:0;
	}
	.entry-content a{
		border-bottom: none !important;
	}
	.play-button-slider{
		top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
	}
	.youtube-icon { position: absolute;

    background:url(<?php echo plugin_dir_url( __FILE__ ); ?>images/play.youtube.png) center center no-repeat;background-size:14%;}
</style>
	<?php
    $args = array(
    'numberposts' => 10,
    'offset' => 0,
    'category' => 0,
    'orderby' => 'post_date',
    'order' => 'DESC',
    'post_type' => 'post',
    'post_status' => 'draft, publish, future, pending, private',
    'suppress_filters' => true );

    $recent_posts = wp_get_recent_posts( $args, ARRAY_A );
	//print_r($recent_posts);
	//echo get_the_post_thumbnail(1, 'thumbnail');
    $image = wp_get_attachment_image_src( get_post_thumbnail_id( 1 ), 'thumbnail' );
	?>

<?php if($sliderloadingicon == "on")	{ ?>
<div class="huge_it_slideshow_image_wrap_<?php echo $sliderID; ?> nocolor">
<?php } else { ?>
<div class="huge_it_slideshow_image_wrap_<?php echo $sliderID; ?> ">
<?php } ?>
	<?php if($sliderloadingicon == "on")	{ ?>
		<div id="huge_it_loading_image_<?php echo $sliderID;  ?>" class="display" ><img  src="<?php echo plugins_url('', __FILE__).'/Front_images/loading/loading'.$paramssld["loading_icon_type"].'.gif'; ?>" alt="" /> </div>
		<div class="huge_it_slideshow_image_wrap1_<?php echo $sliderID; ?> nodisplay">
	<?php } else { ?>
		<div id="huge_it_loading_image_<?php echo $sliderID; ?>" class="nodisplay"> <img src="<?php echo plugins_url('', __FILE__).'/Front_images/loading/loading'.$paramssld["loading_icon_type"].'.gif'; ?>"  alt="" width="100" height="100" style=" margin: 0px auto;" /> </div>
		<div class="huge_it_slideshow_image_wrap1_<?php echo $sliderID; ?>"class="display">
	<?php } ?>
      <?php
      $current_pos = 0;
      ?>

		<!-- ##########################DOTS######################### -->
        <div class="huge_it_slideshow_dots_container_<?php echo $sliderID; ?>">
			  <div class="huge_it_slideshow_dots_thumbnails_<?php echo $sliderID; ?>">
				<?php
				$current_image_id=0;
				$current_pos =0;
				$current_key=0;
				$stri=0;
				foreach ($images as $key => $image_row) {
			  	$imagerowstype=$image_row->sl_type;
				if($image_row->sl_type == ''){
				$imagerowstype='image';
				}
				switch($imagerowstype){

							case 'image':

							  if ($image_row->id == $current_image_id) {
								$current_pos = $stri;
								$current_key = $stri;
							  }

							?>
								<div id="huge_it_dots_<?php echo $stri; ?>_<?php echo $sliderID; ?>" class="huge_it_slideshow_dots_<?php echo $sliderID; ?> <?php echo (($key==$current_image_id) ? 'huge_it_slideshow_dots_active_' . $sliderID : 'huge_it_slideshow_dots_deactive_' . $sliderID); ?>" onclick="if(jQuery(this).hasClass('huge_it_slideshow_dots_active_<?php echo $sliderID; ?>')) { return false; } huge_it_change_image_<?php echo $sliderID; ?>(parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()), '<?php echo $stri; ?>', data_<?php echo $sliderID; ?>,false,true);return false;" data-image_id="<?php echo $image_row->id; ?>" data-image_key="<?php echo $stri; ?>"></div>
							<?php
							  $stri++;
							break;
							case 'video':

							  if ($image_row->id == $current_image_id) {
								$current_pos = $stri;
								$current_key = $stri;
							  }

							?>
								<div id="huge_it_dots_<?php echo $stri; ?>_<?php echo $sliderID; ?>" class="huge_it_slideshow_dots_<?php echo $sliderID; ?> <?php echo (($key==$current_image_id) ? 'huge_it_slideshow_dots_active_' . $sliderID : 'huge_it_slideshow_dots_deactive_' . $sliderID); ?>" onclick="if(jQuery(this).hasClass('huge_it_slideshow_dots_active_<?php echo $sliderID; ?>')) { return false; } huge_it_change_image_<?php echo $sliderID; ?>(parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()), '<?php echo $stri; ?>', data_<?php echo $sliderID; ?>,false,true);return false;" data-image_id="<?php echo $image_row->id; ?>" data-image_key="<?php echo $stri; ?>"></div>
							<?php
							  $stri++;
							break;
							case 'last_posts':

                                                        $keyForStoping = 0;
							foreach($recent_posts as $lkeys => $last_posts){
                                                            if($image_row->name == "0"){
                                                                if($lkeys < $image_row->sl_url){
                                                                    if(get_the_post_thumbnail($last_posts["ID"], 'thumbnail') != ''){
                                                                    $imagethumb = wp_get_attachment_image_src( get_post_thumbnail_id($last_posts["ID"]), 'thumbnail-size', true );

                                                                      if ($image_row->id == $current_image_id) {
                                                                            $current_pos = $stri;
                                                                            $current_key = $stri;
                                                                      }
                                                                    ?>
                                                                            <div id="huge_it_dots_<?php echo $stri; ?>_<?php echo $sliderID; ?>" class="huge_it_slideshow_dots_<?php echo $sliderID; ?> <?php echo (($stri==$current_image_id) ? 'huge_it_slideshow_dots_active_' . $sliderID : 'huge_it_slideshow_dots_deactive_' . $sliderID); ?>" onclick="if(jQuery(this).hasClass('huge_it_slideshow_dots_active_<?php echo $sliderID; ?>')) { return false; } huge_it_change_image_<?php echo $sliderID; ?>(parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()), '<?php echo $stri; ?>', data_<?php echo $sliderID; ?>,false,true);return false;" data-image_id="<?php echo $image_row->id; ?>" data-image_key="<?php echo $stri; ?>"></div>
                                                                    <?php
                                                                      $stri++;
                                                                    }
                                                                }
                                                            }
                                                            else{
                                                                $category_id = get_cat_ID($image_row->name);                            //       USER CHOOSED CATEGORY
                                                                $category_id_from_posts = wp_get_post_categories($last_posts['ID']);    //       GETTING ALL CATEGORIES FOR THIS POST
                                                                if($keyForStoping < $image_row->sl_url){
                                                                    if (in_array($category_id, $category_id_from_posts)){
                                                                            if(get_the_post_thumbnail($last_posts["ID"], 'thumbnail') != ''){
                                                                                $keyForStoping++;
                                                                                $imagethumb = wp_get_attachment_image_src( get_post_thumbnail_id($last_posts["ID"]), 'thumbnail-size', true );

                                                                                if ($image_row->id == $current_image_id) {
                                                                                $current_pos = $stri;
                                                                                $current_key = $stri;
                                                                                }
                                                                                ?>
                                                                                <div id="huge_it_dots_<?php echo $stri; ?>_<?php echo $sliderID; ?>" class="huge_it_slideshow_dots_<?php echo $sliderID; ?> <?php echo (($stri==$current_image_id) ? 'huge_it_slideshow_dots_active_' . $sliderID : 'huge_it_slideshow_dots_deactive_' . $sliderID); ?>" onclick="if(jQuery(this).hasClass('huge_it_slideshow_dots_active_<?php echo $sliderID; ?>')) { return false; } huge_it_change_image_<?php echo $sliderID; ?>(parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()), '<?php echo $stri; ?>', data_<?php echo $sliderID; ?>,false,true);return false;" data-image_id="<?php echo $image_row->id; ?>" data-image_key="<?php echo $stri; ?>"></div>
                                                                                <?php
                                                                                $stri++;
                                                                                }
                                                                    }
                                                                }
                                                            }

							}

							break;
					}
				}
				?>
			  </div>

			<?php
			   if ($paramssld['slider_show_arrows']=="on") {
			 ?>
				<a id="huge_it_slideshow_left_<?php echo $sliderID; ?>" href="#">
					<div id="huge_it_slideshow_left-ico_<?php echo $sliderID; ?>">
					<div><i class="huge_it_slideshow_prev_btn_<?php echo $sliderID; ?> fa"></i></div></div>
				</a>

				<a id="huge_it_slideshow_right_<?php echo $sliderID; ?>" href="#">
					<div id="huge_it_slideshow_right-ico_<?php echo $sliderID;?>">
					<div><i class="huge_it_slideshow_next_btn_<?php echo $sliderID; ?> fa"></i></div></div>
				</a>
			<?php
			}
			?>
		</div>
	  <!-- ##########################IMAGES######################### -->

      <div id="huge_it_slideshow_image_container_<?php echo $sliderID; ?>" class="huge_it_slideshow_image_container_<?php echo $sliderID; ?>">
        <div class="huge_it_slide_container_<?php echo $sliderID; ?>">
          <div class="huge_it_slide_bg_<?php echo $sliderID; ?>">
            <ul class="huge_it_slider_<?php echo $sliderID; ?>">
			  <?php
			  $i=0;
//                          var_dump($images);exit;
			  foreach ($images as $key => $image_row) {
			  	$imagerowstype=$image_row->sl_type;
				if($image_row->sl_type == ''){
				$imagerowstype='image';
				}
				switch($imagerowstype){
					case 'image':
					$target="";
					?>
					  <li class="huge_it_slideshow_image<?php if ($i != $current_image_id) {$current_key = $key; echo '_second';} ?>_item_<?php echo $sliderID; ?>" id="image_id_<?php echo $sliderID.'_'.$i ?>">
						<?php if($image_row->sl_url!=""){
							if ($image_row->link_target=="on"){$target='target="_blank"';}
							echo '<a href="'.$image_row->sl_url.'" '.$target.'>';
						} ?>
						<img id="huge_it_slideshow_image_<?php echo $sliderID; ?>_<?php echo $key ;?>" class="huge_it_slideshow_image_<?php echo $sliderID; ?>" src="<?php echo $image_row->image_url; ?>"  alt="<?php echo $image_row->name; ?>" data-image_id="<?php echo $image_row->id; ?>" />
						<?php if($image_row->sl_url!=""){ echo '</a>'; }?>
						<div class="huge_it_slideshow_title_text_<?php echo $sliderID; ?> <?php if(trim($image_row->name)=="") echo "none"; ?>">
							<?php echo $image_row->name; ?>
						</div>
						<div class="huge_it_slideshow_description_text_<?php echo $sliderID; ?> <?php if(trim($image_row->description)=="") echo "none"; ?>">
							<?php echo $image_row->description; ?>
						</div>
					  </li>
					  <?php
					$i++;
					break;

					case 'last_posts':

                                        $keyForStoping = 0;
					foreach($recent_posts as $lkeys => $last_posts){
                                            if($image_row->name == "0"){
                                                if($lkeys < $image_row->sl_url){
                                                    $imagethumb = wp_get_attachment_image_src( get_post_thumbnail_id($last_posts["ID"]), 'thumbnail-size', true );

                                                    if(get_the_post_thumbnail($last_posts["ID"], 'thumbnail') != ''){
                                                    $target="";
                                                    ?>
                                                      <li class="huge_it_slideshow_image<?php if ($i != $current_image_id) {$current_key = $key; echo '_second';} ?>_item_<?php echo $sliderID; ?>" id="image_id_<?php echo $sliderID.'_'.$i ?>">
                                                            <?php if ($image_row->sl_postlink=="1"){
                                                                            if ($image_row->link_target=="on"){$target='target="_blank"';}
                                                                            echo '<a href="'.$last_posts["guid"].'" '.$target.'>';
                                                            } ?>
                                                            <img id="huge_it_slideshow_image_<?php echo $sliderID; ?>_<?php echo $key ;?>" class="huge_it_slideshow_image_<?php echo $sliderID; ?>" src="<?php echo $imagethumb[0]; ?>"  alt=" <?php echo $last_posts["post_title"]; ?>" data-image_id="<?php echo $image_row->id; ?>" />
                                                            <?php if($image_row->sl_postlink=="1"){ echo '</a>'; }?>
                                                            <div class="huge_it_slideshow_title_text_<?php echo $sliderID; ?> <?php if(trim($last_posts["post_title"])=="") echo "none";  if($image_row->sl_stitle!="1") echo " hidden"; ?>">
                                                                            <?php echo $last_posts["post_title"]; ?>
                                                            </div>
                                                            <div class="huge_it_slideshow_description_text_<?php echo $sliderID; ?> <?php if(trim($last_posts["post_content"])=="") echo "none"; if($image_row->sl_sdesc!="1") echo " hidden"; ?>">
                                                                    <?php
                                                                    echo substr_replace($last_posts["post_content"], "", $image_row->description); ?>
                                                            </div>
                                                     </li>
                                                      <?php
                                                    $i++;
                                                    }
                                                }
                                            }
                                            else{
                                                $category_id = get_cat_ID($image_row->name);                            //       USER CHOOSED CATEGORY
                                                $category_id_from_posts = wp_get_post_categories($last_posts['ID']);    //       GETTING ALL CATEGORIES FOR THIS POST
                                                if($keyForStoping < $image_row->sl_url){
                                                    if (in_array($category_id, $category_id_from_posts)){
                                                        $imagethumb = wp_get_attachment_image_src( get_post_thumbnail_id($last_posts["ID"]), 'thumbnail-size', true );
                                                        if(get_the_post_thumbnail($last_posts["ID"], 'thumbnail') != ''){
                                                            $keyForStoping++;
                                                            $target="";
                                                        ?>
                                                          <li class="huge_it_slideshow_image<?php if ($i != $current_image_id) {$current_key = $key; echo '_second';} ?>_item_<?php echo $sliderID; ?>" id="image_id_<?php echo $sliderID.'_'.$i ?>">
                                                                <?php if ($image_row->sl_postlink=="1"){
                                                                                if ($image_row->link_target=="on"){$target='target="_blank"';}
                                                                                echo '<a href="'.$last_posts["guid"].'" '.$target.'>';
                                                                } ?>
                                                                <img id="huge_it_slideshow_image_<?php echo $sliderID; ?>" class="huge_it_slideshow_image_<?php echo $sliderID; ?>" src="<?php echo $imagethumb[0]; ?>"  alt="<?php echo $last_posts["post_title"]; ?>" data-image_id="<?php echo $image_row->id; ?>" />
                                                                <?php if($image_row->sl_postlink=="1"){ echo '</a>'; }?>
                                                                <div class="huge_it_slideshow_title_text_<?php echo $sliderID; ?> <?php if(trim($last_posts["post_title"])=="") echo "none";  if($image_row->sl_stitle!="1") echo " hidden"; ?>">
                                                                                <?php echo $last_posts["post_title"]; ?>
                                                                </div>
                                                                <div class="huge_it_slideshow_description_text_<?php echo $sliderID; ?> <?php if(trim($last_posts["post_content"])=="") echo "none"; if($image_row->sl_sdesc!="1") echo " hidden"; ?>">
                                                                        <?php
                                                                        echo substr_replace($last_posts["post_content"], "", $image_row->description); ?>
                                                                </div>
                                                         </li>
                                                          <?php
                                                        $i++;
                                                        }
                                                    }
                                                }
                                            }
					}
					break;
					case 'video':

						?>
						<li  class="huge_it_slideshow_image<?php if ($i != $current_image_id) {$current_key = $key; echo '_second';} ?>_item_<?php echo $sliderID; ?>" id="image_id_<?php echo $sliderID.'_'.$i ?>">
							<?php
								if(strpos($image_row->image_url,'youtube') !== false || strpos($rowimages->image_url,'youtu') !== false){
									$video_thumb_url=get_youtube_id_from_url($image_row->image_url);
								?>

									<div id="video_id_<?php echo $sliderID;?>_<?php echo $key ;?>" class="huge_it_video_frame_<?php echo $sliderID; ?>"></div>
									<div class="thumb_wrapper" data-rowid="<?php echo $image_row->id; ?>" onclick="thevid=document.getElementById('video_id_<?php echo $sliderID;?>_<?php echo $key ;?>'); thevid.style.display='block'; this.style.display='none'">
												<img  class="thumb_image" src="https://i.ytimg.com/vi/<?php echo $video_thumb_url; ?>/hqdefault.jpg">
												<div class="play-button-slider youtube-icon"></div>
									</div>
							<?php }else {
									$vimeo = $image_row->image_url;
									$imgid =  end(explode( "/", $vimeo ));

							?>
								<iframe id="player_<?php echo $key ;?>"  class="huge_it_video_frame_<?php echo $sliderID; ?>" src="//player.vimeo.com/video/<?php echo $imgid; ?>?api=1&player_id=player_<?php echo $key ;?>&showinfo=0&controls=0" frameborder="0" allowfullscreen></iframe>
							<?php } ?>
						</li>
					<?php
					$i++;
					break;
				}
			 }
			  ?>
            </ul>
          </div>
		  <input  type="hidden" id="huge_it_current_image_key_<?php echo $sliderID; ?>" value="0" />
        </div>
      </div>
	</div>
<!-- slider thumbs  -->

<script>
jQuery(document).ready(function($) {

	setInterval(function() {
	jQuery('.huge_it_slider_<?php echo $sliderID; ?>').find("li").each(function (){

  		if($(this).css("opacity") == "1"){

  			var img_id=$(this).attr('id');
  			jQuery('.huge_it_slideshow_thumbs_<?php echo $sliderID; ?>').each(function (){
  				//if ($(this).hasClass('bx-clone')){$(this).removeAttr('id')}
  				var allListElements = $( 'li[id='+img_id+']' );

  				$(this).find(allListElements).not(".bx-clone").each(function() {

  					jQuery('.huge_it_slideshow_thumbs_<?php echo $sliderID; ?> li').find(".trans_back").css('background','rgba(255,255,255,0.3)');
  					$(this).find('.trans_back').css('background','none');

  				})

  			})

  		}

	})
},100)

})
</script>

</div>
<?php if($sliderthumbslider=='thumbnails'){?>
<div class="huge_it_slideshow_thumbs_container_<?php echo $sliderID; ?>">
			  <ul id="huge_it_thumb_slider" class="huge_it_slideshow_thumbs_<?php echo $sliderID; ?>">
				<?php
				$i=0;
				$current_image_id=0;
				$current_pos =0;
				$current_key=0;
				$stri=0;
				// foreach ($slider as $row => $value) {
				// 	$time=$row->description;
				// 	echo $time;
				// }
				foreach ($images as $key => $image_row) {
			  	$imagerowstype=$image_row->sl_type;

			  	////////$imgurl
				if($image_row->sl_type == ''){
				$imagerowstype='image';
				}
				switch($imagerowstype){

							case 'image':

							  if ($image_row->id == $current_image_id) {
								$current_pos = $stri;
								$current_key = $stri;
							  }

							?>

								<li id="image_id_<?php echo $sliderID.'_'.$i ?>" class="huge_it_slideshow_thumbnails_<?php echo $sliderID; ?>" onclick="if(jQuery(this).hasClass('huge_it_slideshow_thumbnails_active_<?php echo $sliderID; ?>')) { return false; } huge_it_change_image_<?php echo $sliderID; ?>(parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()), '<?php echo $stri; ?>', data_<?php echo $sliderID; ?>,false,true);return false;" data-image_id="<?php echo $image_row->id; ?>" data-image_key="<?php echo $stri; ?>">
										<img class="sl_thumb_img" src="<?php echo $image_row->image_url; ?>" />
										<div class="trans_back" ></div>
										<input type="hidden" id="time" name="time" value="<?php echo $slidepausetime; ?>">

								</li>
							<?php
							  $stri++;
							   $i++;
							break;
							case 'video':

								$url=$image_row->image_url;
								if(!function_exists('get_youtube_id_from_url_slider_thumb')) {
								function get_youtube_id_from_url_slider_thumb($url){
								if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match)) {
									return $match[1];
								}

						}
					}

						if(strpos($image_row->image_url,'youtube') !== false || strpos($image_row->image_url,'youtu') !== false) {
								$video_thumb_url=get_youtube_id_from_url_slider_thumb($image_row->image_url);
								$thumburl='<img class="sl_thumb_img" src="http://img.youtube.com/vi/'.$video_thumb_url.'/mqdefault.jpg" alt="" />';
								$liclass="youtube";
							}else if (strpos($image_row->image_url,'vimeo') !== false) {
											$liclass="vimeo";
											$vimeo = $image_row->image_url;
											$imgid =  end(explode( "/", $vimeo ));
											$hash = unserialize(file_get_contents("http://vimeo.com/api/v2/video/".$imgid.".php"));
											$imgsrc=$hash[0]['thumbnail_large'];
											$thumburl ='<img src="'.$imgsrc.'" alt="" />';
										}

							  if ($image_row->id == $current_image_id) {
								$current_pos = $stri;
								$current_key = $stri;
							  }

							?>
							<li id="image_id_<?php echo $sliderID.'_'.$i ?>" class="huge_it_slideshow_thumbnails_<?php echo $sliderID; ?>" onclick="if(jQuery(this).hasClass('huge_it_slideshow_thumbnails_active_<?php echo $sliderID; ?>')) { return false; } huge_it_change_image_<?php echo $sliderID; ?>(parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()), '<?php echo $stri; ?>', data_<?php echo $sliderID; ?>,false,true);return false;" data-image_id="<?php echo $image_row->id; ?>" data-image_key="<?php echo $stri; ?>">
								<?php echo $thumburl; ?>
								<div class="play-icon <?=$liclass; ?>"></div>
								<div class="trans_back" ></div>
								<input type="hidden" id="time" name="time" value="<?php echo $slidepausetime; ?>" slide="<?php echo $sliderID; ?>">
							</li>

							<?php
							  $stri++;
							  $i++;
							break;

							case 'last_posts':

                                        $keyForStoping = 0;
					foreach($recent_posts as $lkeys => $last_posts){
                                            if($image_row->name == "0"){
                                                if($lkeys < $image_row->sl_url){
                                                    $imagethumb = wp_get_attachment_image_src( get_post_thumbnail_id($last_posts["ID"]), 'thumbnail-size', true );

                                                    if(get_the_post_thumbnail($last_posts["ID"], 'thumbnail') != ''){
                                                    $target="";
                                                    ?>
                                                      <li id="image_id_<?php echo $sliderID.'_'.$i ?>" class="huge_it_slideshow_thumbnails_<?php echo $sliderID; ?>" onclick="if(jQuery(this).hasClass('huge_it_slideshow_thumbnails_active_<?php echo $sliderID; ?>')) { return false; } huge_it_change_image_<?php echo $sliderID; ?>(parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()), '<?php echo $stri; ?>', data_<?php echo $sliderID; ?>,false,true);return false;" data-image_id="<?php echo $image_row->id; ?>" data-image_key="<?php echo $stri; ?>">

                                                            <img class="sl_thumb_img" src="<?php echo $imagethumb[0]; ?>"/>
                                                            <div class="trans_back" ></div>
															<input type="hidden" id="time" name="time" value="<?php echo $slidepausetime; ?>">

                                                     </li>
                                                      <?php
                                                    $i++;
                                                    }
                                                }
                                            }
                                            else{
                                                $category_id = get_cat_ID($image_row->name);                            //       USER CHOOSED CATEGORY
                                                $category_id_from_posts = wp_get_post_categories($last_posts['ID']);    //       GETTING ALL CATEGORIES FOR THIS POST
                                                if($keyForStoping < $image_row->sl_url){
                                                    if (in_array($category_id, $category_id_from_posts)){
                                                        $imagethumb = wp_get_attachment_image_src( get_post_thumbnail_id($last_posts["ID"]), 'thumbnail-size', true );
                                                        if(get_the_post_thumbnail($last_posts["ID"], 'thumbnail') != ''){
                                                            $keyForStoping++;
                                                            $target="";
                                                        ?>
                                                           <li id="image_id_<?php echo $sliderID.'_'.$i ?>" class="huge_it_slideshow_thumbnails_<?php echo $sliderID; ?>" onclick="if(jQuery(this).hasClass('huge_it_slideshow_thumbnails_active_<?php echo $sliderID; ?>')) { return false; } huge_it_change_image_<?php echo $sliderID; ?>(parseInt(jQuery('#huge_it_current_image_key_<?php echo $sliderID; ?>').val()), '<?php echo $stri; ?>', data_<?php echo $sliderID; ?>,false,true);return false;" data-image_id="<?php echo $image_row->id; ?>" data-image_key="<?php echo $stri; ?>">

                                                                <img id="huge_it_slideshow_image_<?php echo $sliderID; ?>" class="huge_it_slideshow_image_<?php echo $sliderID; ?>" src="<?php echo $imagethumb[0]; ?>"/>
                                                                <div class="trans_back" ></div>
																<input type="hidden" id="time" name="time" value="<?php echo $slidepausetime; ?>">

                                                         </li>
                                                          <?php
                                                        $i++;
                                                        }
                                                    }
                                                }
                                            }
					}
					break;

						}

			}

		//print_r($count);
			?>

			  </ul>

	</div>
<?php } ?>

	  <?php
	return ob_get_clean();
}
?>


text:
Home / Coronavirus / Kenny Dalglish / Kenny Dalglish Tests Positive for Coronavirus / Legend / Liverpool / Positive / Liverpool Legend Kenny Dalglish Tests Positive for Coronavirus
Liverpool Legend Kenny Dalglish Tests Positive for Coronavirus
April 11, 2020 Coronavirus, Kenny Dalglish, Kenny Dalglish Tests Positive for Coronavirus, Legend, Liverpool, Positive
Liverpool legend Sir Kenny Dalglish has tested positive for coronavirus and is in hospital but is showing no symptoms, his family have announced.
Dalglish was admitted to hospital on Wednesday for treatment of an infection which required intravenous antibiotics.
The 69-year-old former Celtic and Scotland forward was routinely tested for coronavirus after being admitted.
"Unexpectedly, the test result was positive but he remains asymptomatic," the Dalglish family said.
The statement added: "He would like to take this opportunity to thank the brilliant NHS staff, whose dedication, bravery and sacrifice should be the focus of the nation's attention at this extraordinary time.
"Prior to his admission to hospital, Sir Kenny had chosen to voluntarily self-isolate for longer than the advised period together with his family. He would urge everyone to follow the relevant government and expert guidance in the days and weeks ahead.
"He looks forward to being home soon. We will provide further updates as and when it is appropriate."
Liverpool Legend Kenny Dalglish Tests Positive for Coronavirus Reviewed by Rush Hour Sport on April 11, 2020 Rating: 5

redpajama_set_name: RedPajamaCommonCrawl


text:
in: Arthur Ransome, Books, Ship's babies, Pages using ISBN magic links
The Last Englishman
The Last Englishman: The Double Life of Arthur Ransome is a 2009 book by Roland Chambers.
He said in the Introduction (page 8) that he has intended his book initially as a brief and colourful exposé, a sharp adjustment to the whitewash hithertoo. But he then found fascination with which Ransome adopted or blended all the competing ideas of his generation and was on good terms with holders of opposing viewpoints: nationalists and internationalists, democrats and Marxist-Leninists, Bohemians and conservatives, champions of self-determination and imperialists. .
He refers to the series as: an Edwardian idyll of bun loaf and pemmican, of butter and marmalade sandwiches, of cotton tents and grog and tea at four, and children who say 'ripping' and play by the rules .... a world supervised by adults, but only at a distance .... (page 7).
He mentions (pages 6,357) two negative assessments of the "Swallows and Amazons" stories; David Garnett regretted that his old friend had perpetuated a fantasy he once opposed. He complained that the characters in contemporary children's books are almost always polite, rational and well-behaved citizens of a sensibly managed world (though) this false picture is the work of a generation of violent rebels, who defied Victorian conventions and morality. William Trevor the Irish writer who was bewildered by the Walkers as a boy, later deciding they were miniature adults in a middle-class fantasy. He joked that if two departments of the civil service had lain abed for long enough, 'they woulfd have produced the magnificently right-minded Swallows and Amazons.
But he noted (page 357) that J. R. R. Tolkien's children owned the whole set, likewise A. A. Milne(s). The young Queen Elizabeth read them, and W. G. Collingwood lived long enough to say that "the second, Swallowdale, pleased him as much as the first, and I can't say fairer than that".
The Last Englishman: The Double Life of Arthur Ransome by Roland Chambers (2009, faber and faber, London) ISBN 978-0-571-22261-2
This article is a Ship's Baby. You can help Arthur Ransome Wiki by giving it some cream puffs.


The museum is less than ten minutes walk from Leicester train station.
This exhibition explores the legacy and art of the Indian Modernist painter Lancelot Ribeiro (1933-2010).
Restless, prolific and experimental, he produced a unique body of work inspired by his old Portuguese Goan roots - a unique fusion of Indian graphic art and Abstract Expressionism.
He first came to Britain in 1950, abandoning his accountancy course to take up life drawing. Soon returning to India, he held several successful one-man and group exhibitions, settling permanently in London in 1962.
Ribeiro created an important group of works, mixing traditional oil paints with PVA (polyvinyl acetate), the forerunner of commercial acrylic paints and in the decades that followed, he continued to reinvent the manner and medium in which he worked.
Drawn from the Ribeiro Collection and our collection, the exhibition traces the story of this important Indian artist and his artistic development.


text:
Q: How to fix "set -e -o pipefail" (CentOS script) for Ubuntu 18.04 LTS? I'm working with a set of scripts that automate some bioinformatics (mitoVGP; https://github.com/VGP/vgp-assembly/tree/master/mitoVGP) and then the install is done as a conda environment.
The problem (sh symlinked to dash, as opposed to bash) has been outlined by @SergiyKolodyazhnyy in the first answer here: "set -e -o pipefail" not working on bash script on Ubuntu 16
So, my question is, how do I fix these scripts, or else make it such that invoking them with  makes them such that they work/run in a bash environment on Ubuntu?

redpajama_set_name: RedPajamaStackExchange


text:
Top 7 Best Gay Hookup Sites | Free Gay Dating Sites
Are you a gay man seeking for a hookup, a casual date, or a long-term relationship? Gone are the days of having to go out to an expensive club or a crowded bar just to meet cute gays. More so, the life of a gay can be pretty tricky where he has to deal with the acceptance of others in each environment he comes across. Because some gays are not accepted, they tend to keep their issues with themselves and also deny who they are. The technology has made things easy for you in the comfort of your chair. Today, you can find what you are seeking for by signing up for a free gay dating site that is customized just for you. Gay men can go online for easy access to hot men who have similar sex fetishes and relationship goals. However, with lots of gay dating sites on the web and each of them claiming to provide the best dating services, it may be challenging to find the right one for your sexual needs. To save you from the hassle, here is an exclusive review of the top 7 free gay dating and hookup sites.
1) Outpersonals
Visit OutPersonals.com
With a current membership of over 1.3 million users, Outpersonals.com claims to be one of the world's biggest gay dating and hookup sites on the internet. Members can access the site features, including video profiles, blogs, webcams, and standard chat. Once you get into the website, the signup process is quick and free, allowing you to create a profile and begin searching. You will be astounded by the possibilities the site has to offer when you register. However, you will not be able to communicate with other members unless you pay for a premium subscription. The gold membership plan goes for $29.96 per month. The plan offers you advanced search features, places you at the top of the search listing and even guarantees you of getting a hookup or three months free monthly subscription.
Not only is Outpersonals one of the large and well-built gay dating site but also a platform to find your new best gay friend. The site is similar to a kinky gay Facebook offering text and video chat, personal blogs, and everything you ever wished for. It also has communities with different sex interests that might have, and its advanced search feature has many filters to help you find a perfect match just for you. They even have a dating magazine where you will earn points to redeem for free months. Isn't that cool?
2) AdultFriendFinder
Visit AdultFriendFinder.com
AdultFriendFinder is one of the top best m4m dating sites around the world. The site has more than 95 million members, with about 65 percent of the members being men. A substantial amount of these men is gay, which makes it easy to find a cute guy who attracts your eye. AdultFriendFinder does not beat around the bush; you will get right into the dating business as soon as you sign up with every member sexually active, seeking someone to join him in bed. However, you should not make a mistake, this site deals with short-term casual affairs and hookups, and it's not about building long term friends.
The dating site is gorgeous and always updated, which adds to the overall excellent experience of using the site. AdultFriendFinder has adequately been optimized for smartphones with a modern mobile website and apps for both iOS and Android enabling you to use it even on the go. With this site, gays and bisexual men have a platform to mingle and chat free of prejudice, intrusions, and judgment.
3) Scruff
Visit Scruff.com Scruff provides gay dating and chatting all over the world. The site was launched in 2010 and claim to have more than 15 million gay members, with thousands of others joining the site every day. Scruff was previously started as a platform for a particular type of bearded gay man to search for hookups later to become one of the leading dating platforms featuring millions of gay men. It is a gay-specific dating app available on App Store and Google Play and features a streamlined and sleek portal for singles on the prowl. Most of the men on this dating site are seeking for love and long-term relationships, but Scruff.com is also there for guys who only want a one-night stand to satisfy their sexual fetishes. The site has a matching system that learns about your sexual preferences as you scroll and provides a new stock of hotties every day.
Scruff has a user-friendly layout that lets you scroll through the hot gay guys seamlessly. Additionally, this guy site features a travel section that helps members to get tips on cities they will be visiting as well as a section that highlights upcoming queer events in your location. However, you won't be able to enjoy some premium features unless you subscribe to a Pro account. For instance, photos sent to you by your suitors will disappear after a few minutes of chatting, which s an inconvenience. Scruff provides three Pro Memberships options, including; one-month subscription plan for $14.99, a 3-month subscription plan for $13.33 per month, and a 1-year subscription plan for $9.99 per month.
4) GuySpy
Visit GuySpy.com
Home to millions of gay dudes, GuySpy.com offers you a platform to make new gay friends or even establish a love relationship. The gay dating site makes it easy to chat with gay men and arrange an intimate rendezvous encounter. Thousands of gay men mingle actively on this fast-growing dating site for guys looking for other guys. Members enjoy unlimited instant chat features allowing them to seduce their potential match partners. More so, the site has a map feature that uses GPS technology to locate available gays in any location you go that makes it easy to find gay partners in your neighborhood. GuySpy users have detailed profiles for you to go through and find a gay partner who has similar sex fetishes with you. Chat, send special pictures, voice messages, exchange videos with potential partners. It also keeps the user's information discreet with their top-notch security and customer support. The member's profile displays their appearance through their uploaded profile picture and allows them to have as many details as they can with extremely low to no fake profiles. To access premium services, the site offers several GuySpy+ plans. it has a one-week subscription plan for $4.99, one-month subscription for $9.99, 3-month subscription plan for $24.99, 6-month subscription plan for $39.99- and one-year subscription plan for $59.99. your subscription plan will be renewed automatically unless turned off at least one day before the end of the current subscription period. Come and join GuySpy, where we have the sexiest and hottest guys regardless of what you are into; jock, discreet, daddy, college, leather, muscle, curious, geek, bisexual, or geek.
5) DaddyHunt
Visit DaddyHunt.com
DaddyHunt.com is among the best online gay hookup app site, as the name suggests. This is the right platform for bisexuals, experienced gays, and curious men from all backgrounds, ages, and races to sign up and meet someone special online with similar fetishes. It offers a much-needed service for gay entertainers. It provides a much-needed voice, and a platform to express themselves with what they need to satisfy their gay kinks. It also caters to silver foxes and gays who want to date older men. More than a million gay men are always active on this site, guaranteeing you to find your perfect match instantaneously. You only need to signup and start flirting with your potential matches. DaddyHunt nurtures a vibrant community of otters, bears, polar bears, wolves, and other types of gay singles for those gay men seeking experienced gays. The standard membership is free but has supporter memberships for premium features. You can subscribe to the 7-day trial for $7, 30 days plan for $15, 3 months for $36, and a 6month plan for $45.
6) Benaughty
Visit Benaughty.com
Benaughty is one of the best and largest gay hookup sites around the world, with lots of gay men from all backgrounds and ages. The site has more than 60 percent of the members as men, the majority of them being gay, and you can be able to set your preferences to see only the most compatible partners. You will be able to take part in the adult fun by registering as a member and filling in your gay sexual preferences. This way, the site will find you a naughty gay partner in no time. You can only receive messages or winks from members with photos meaning you can see the person you are flirting with making the connection faster. The site is very diverse with different members coming from all walks of life and location, and you will be sure to have a fascinating experience. It is mobile phone friendly, fast, simple to use and big. There is nothing you will not love about this gay site. If you are searching for anything from a casual hookup to a romantic involvement to anything in between, Benaughty.com is the dating website for you.
7) Chappyapp
Visit Chappyapp.com
Chappy is a UK based dating app that is perfect for the modern gay man. On this site, you are guaranteed to find a horny gay guy or even couple withing minutes. The term Chappy comes from the prefixes of choice and happy because they believe in putting the needs of singles first in the current online fast-paced dating scene. Here, your intentions influence your matches. When signing up, you will identify yourself as hookup-oriented or relationship-oriented hence casual daters will not waste their time chatting with long-term dating partners. The site has advanced filtering tools to shorten your search for personalized gay date prospects. The site divides all guys into various subcategories, including; commitment, casual, friends, and all dates for your convenience in finding the right partner. Signing up for the site and setting up your profile is easy and needs you to fill up particular information about yourself to make sure that your interests are met and keeps you away from fake profiles and potential scammers. Whether you wish to find Mr. Right Now or Mr. Right, this is one of the best gay sites for you.
Dating can be tedious, frustrating, challenging, and even productive. Online hookup websites make it fun and daring to reignite your passion for it. These are the best gay dating sites where everyone is welcome, and your opinion matters. And although these gay websites are advertised to gay men, none of them will discriminate against you or any gender that you will choose to be. They provide you with a world of opportunity to meet gays and satisfy your sex kinks. Whether you are turned on by a slim or plump man, these websites aim to please you with a tailored selection of horny and hot dudes. Gender is an expression and spectrum, and you have every right to express yourself in any way. Millions of gay men are awaiting you online and will satisfy your gay appetite with absolute discreetness.
14 Best Transgender Dating Sites to Find Local Trans Women
13 Best Gay Dating Sites & Apps For Men
Bisexual Dating Apps & Sites for Bisexual Women & Couples


Ask a typical person what kind of chipset is in their mobile handset and you're likely to get a blank stare in return. Most people are not aware of what all goes into the hardware side of phones and assume that one company produces and assembles the parts.
Take for instance the T-Mobile G1. A vast majority of the people who have this phone don't know that Qualcomm actually produces the chipset.
One year ago today, we first ran an article about Qualcomm's chipset called the Snapdragon, which clocks in at 1Ghz speeds and is geared towards 3G devices. Now it's being shown off at CES with Android and Qualcomm is talking up the OS.
As of late last year, the chipset was being used on over 30 device designs by some 15+ companies. Among them are fellow Open Handset Alliance members ASUS International, HTC, LG, Samsung, and Toshiba. Oh, and Wind River Wind River provided the software code to help get Android running on larger screen devices. It's expected that Wind River will make available the code to all members of the OHA soon.
good post. yeah their are many makers in a device.


It was lovely February evening when Majethia pinged us on whatsapp. His status read- I am on liquid diet henceforth as advised.
The status sent some shockers to a lot us who got concerned if all is well with him and why all of sudden he has been advised to have a liquid diet. If all is well with him or his liver. I pinged him asking if all is well..to which he candidly replied in Gujarati- Mazaa ma [enjoying]. Before I could ask further on his status message, saw him going offline.
Me and some of the other concerned "speakeasy" members then decided to rush at his home to check on him. We were worried as hell and with bated breaths, reached his home and rang the bell. The door was opened by Majethia himself who was holding a clear glass of whisky in one of his hand. The sight send us all in dizzy and a mad frenzy that how come someone can be so careless about his health and in spite of being advised on liquid diet, still having his glass of whisky? After all whisky drinking was not meant for an addiction per se but just relishing the flavor at certain times.
The angry Aditi went hopping mad on Majethia and gave him a good piece of mind. He tried to interrupt her couple of times but was silenced by her machine gun stacking talks.
Aditi concluded herself saying- when you were advised to be on liquid diet, why are you having a liquor diet?
The defending Majethia came to his own rescue and said, pointing towards his glass- This is the liquid diet I was talking about as the hotness in temperature is about to rise and food is becoming too heavy to consume..hence this liquid oops liquor diet.
His quiet demeanor and chutzpah way of saying made us all gush into laughter. Peel of laughter and later on, we spent an hour discussing the probable food pairing on the same.It was time for Raisa to speak who has recently stumbled upon a great site- http://massolitpublishing.blogspot.in/ and found an interesting smoked Salmon with apple salsa recipe for her non veg tastes. here is the reproduction of the recipe that she strongly recommended. Dear Veg lovers like me, do not be disheartened as I will soon post a veg recipe on this space soon that will go well with the TGR blend.
Disclaimer- This post is for the people age 25 years or above.