
function slideSwitch() {
    var $active = $('#slideshow div.active');

    if ( $active.length == 0 ) $active = $('#slideshow div:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#slideshow div:first');

    // uncomment the 3 lines below to pull the images in random order
    
    // var $sibs  = $active.siblings();
    // var rndNum = Math.floor(Math.random() * $sibs.length );
    // var $next  = $( $sibs[ rndNum ] );


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 3000, function() {
            $active.removeClass('active last-active');
        });
}
 function tool_tip(add_id,append,kmouse)
   {
			$("body").append(append);
			$("#"+add_id).fadeIn(500);
			 $("#"+add_id).css({left:kmouse.pageX-400, top:kmouse.pageY-400});	   	          
   }
function hideMap(id)
{
	$("#"+id).fadeOut(500);
	//$("body").css('overflow','auto');
}
$(function() {
	
    setTimeout("slideSwitch()", 8000 );
});

//links with ajax
/*
function load_data(class,method,url,data,)
{
		$("'"+class+"'").click(function(){
			$.ajax({
				type:method,
				url:url,
				data:data,
				beforeSend:function(){
					$(".content_top_data1").html("<img src='asset/images/ajax_loader.gif' alt='Please wait ...'/>");
				},
				success:function(html){
					$(".content_top_data1").html(html);
				}
			});							
		});
}
function tool_tip(tag_specific,name)
   {
       $(tag_specific).each(function(i)
	   {
                            $("body").append("<div class='tooltip' id='"+name+i+"'><span>"+$(this).attr('title')+ "</span></div>");
                            var my_tooltip = $("#"+name+i);
                            if($(this).attr('title')!=''){
                                $(this).removeAttr("title").mouseover(function(){
                                                my_tooltip.css({opacity:0.9, display:"none"}).fadeIn(400);
                                }).mousemove(function(kmouse){
                                                my_tooltip.css({left:kmouse.pageX+10, top:kmouse.pageY+10});
                                }).mouseout(function(){
                                                my_tooltip.fadeOut(400);
                                });
                            }
         });
            
   }
*/
