
$jq = jQuery.noConflict();


var slide = function() {
   var $jqstarted, $jqstoped;
   
   return {
	    started : function(){  started = setInterval("Tg_Slide()", 6000 /* slide durration miliseconds */); },
        stoped : function(){
		   clearInterval(started);
		}
   }
}();

slide.started();


Tg_Slide();
//function for each click on li
$jq(document).ready(function(){
var $jqtoStop;
$jq("ul.bund li").click(function(){
		    clearTimeout($jqtoStop);
			    slide.stoped(); // stops slideshow because user selected a bullet navigation
			    $jqtoStop = setTimeout(function(){ slide.started(); }, 4000); // continue  slideshow after 4 seconds
            tg_Change($jq(this));
			return false;
			
	});
});

//this is slide_show function 
function Tg_Slide(){
			var $jqactive = $jq('.bund li.active');
			if ($jqactive.length == 0) $jqactive = $jq('.bund li:last') ;
			var $jqnext =  $jqactive.next("li").length ? $jqactive.next("li")
			: $jq('.bund li:first');   
			$jqactive.removeClass("active");
		    tg_Change($jqnext);
}
//this changes slide content/text
function tg_Change($jqelement){
		$jq(".bund li.active").removeClass("active");
		$jqelement.addClass('active');
		$jq(".feat-text").find('.esi').slideUp("fast").delay(300);
		$jqelement.find(".esi").clone().appendTo(".feat-text").slideDown(1200, re_img($jqelement));
		

}
//this for change the image
function re_img($jqelement){
	var src = $jqelement.find("img").attr('src');
	$jq(".featured-img img").hide().delay(50);
	$jq(".featured-img img").attr('src', src).fadeIn(1000);

	
}



