jQueryflag=-1;
jQuery.noConflict();
      var jQuerycontainW=350; 
function slideSwitch() {
    
   
    jQuery('.topF').css('opacity','0').css('zIndex',0);
    
       if(jQueryflag==0){
           
          jQuery('.topF:first').css('zIndex',0);
          jQueryflag=1 
        }    
    jQuery('.active').show().css('opacity','1').css('zIndex',1000);
    jQuery('.active').find('img').css('opacity','0');
    jQuery('.active').find('img').animate({opacity:1},2000);
     var  jQueryimg=jQuery('.active img').width();
             
        if(jQueryimg<=jQuerycontainW){   
            jQuery('.active img').css('marginRight',(jQuerycontainW-jQueryimg)/2+'px');
        }else{
               
               jQueryimg='';
           }
          
    jQuery('.active>#left,.active>#right>img').css('opacity','0').parent().prev().css('opacity','1');
  
    jQuery('.active>#left, .active>#right>img').animate({
            opacity: 1
        },4000,function() {   }
    )
     jQuery('.active').prev().animate({opacity:0},2000);
     jQuery('.active').addClass('toberemove');
          if(jQuery('.toberemove').is('.last')){
                jQuery('.topF:first').addClass('active');
          }
          else{
                jQuery('.toberemove').next().addClass('active'); 
          }
            
           jQuery('.toberemove').removeClass('active').removeClass('toberemove'); 
   
}

jQuery(function()
{
    if(jQuery('.topF').length>0)
    {
       jQuery('.topF:first').next().addClass('active');
          jQueryflag=0;
       jQuery('.topF:last').addClass('last');
       jQuery('.topF:not(:first)').css('opacity','0');
       jQuery('#frontpage').css('height',jQuery('.topF').innerHeight()+'px');
       jQueryi=10000;
       
       jQuery('.topF a>img').each(function()
       {
       var jQueryimg=jQuery(this).width();
           
           if(jQueryimg<=jQuerycontainW){
                jQuery(this).css('marginRight',(jQuerycontainW-jQueryimg)/5+'px');
           }else{
               // jQuery(this).css('marginRight',(jQuerycontainW-jQueryimg)/9+'px'); 
           }
       });
       jQuery('.topF:first').css('zIndex',2000);
     
        jQuery('.topF').each(function()
       {        jQueryi=jQueryi-10;
           //  jQuery(this).css('zIndex',jQueryi);    
       });
        //  jQuery('.topF:first').css('zIndex',10000); 
         jQuery('.topF:first').css('zIndex',2000);
         
        if(jQuery('.topF').length>1) 
        setInterval( "slideSwitch()", 10000 );
    }
  
});

