jQuery.noConflict();

function carousel(lang) {  
    var url = 'http://' + location.hostname + '/ajax-karusel/?lang=' + lang;
    jQuery.get(url, function(data, textStatus) {
      jQuery('#skip').before(data);
      jQuery('div.scrollable').scrollable({
        circular: true
      });                
      jQuery('.sheet').fadeTo(1,0);
      jQuery('.sheet').addClass('sheet-visible');
      jQuery('.sheet').hover(
        function () {
          jQuery(this).fadeTo(1,0.3);
        },
        function () {
          jQuery(this).fadeTo(1,0);
        }
      );
    });    
  }

jQuery(document).ready(function() {         
  jQuery('#applications ul li a').each(function() {
    jQuery(this).mouseover(function() {
      var parts = jQuery(this).attr('href').split('.');
      var file = parts[1];
      var href = jQuery(this).attr('href');
      var title = jQuery(this).attr('title');
      jQuery('#logo-placeholder a').attr({
        href: href,
        title: title
      });
      var host = location.hostname;
      jQuery('#logo-placeholder a img').attr('src', 'http://' + host + '/images/logo-' + file + '.gif');
    });
  });

 var imagesUrl='/_common/epcommon_3_4/_gfx/';

 var editButtons=new Array(
  new Array('btnEditActive','page_white_edit.gif','page_edit.gif'),
  new Array('btnSortUpActive','arrow_up_green.gif','arrow_up_red.gif'),
  new Array('btnSortUpInactive','arrow_up_grey.gif','arrow_up_grey.gif'),
  new Array('btnSortDownActive','arrow_down_green.gif','arrow_down_red.gif'),
  new Array('btnSortDownInactive','arrow_down_grey.gif','arrow_down_grey.gif'),
  new Array('btnVisibleActive','eye_visible.gif','eye_invisible.gif'),
  new Array('btnDeleteActive','delete.gif','cross.gif'),
  new Array('btnAddActive','add.gif','add_blue.gif')
 );

 jQuery('.btnIco').css({backgroundColor:'transparent',backgroundPosition:'center bottom',backgroundRepeat:'no-repeat',display:'block',height:'16px',textEecoration:'none',width:'20px',padding:'0px 0px',margin:'0px 0px',border:'none'});
 jQuery('.ep_adminTools_button,.ep_adminTools_button_noActive').css({backgroundImage:'none',fontFamily:'"Verdana CE", Verdana, "Arial CE", Arial, "Lucida Grande CE", lucida, "Helvetica CE", sans-serif',padding:'0px 0px',margin:'0px 0px',fontSize:'11px',fontWeight:'normal',textTransform:'none',display:'inline',lineHeight:'1.4',float:'none',border:'none'});
 jQuery('.ep_adminTools_button_noActive').css('background-color','#c58888');
 jQuery('.dark_green').css('background-color','#00c500');


 jQuery('.ep_adminTools_button').hover(
  function(){
   jQuery(this).css('background-color','#f80');
  },
  function(){
   jQuery(this).css('background-color','#c50000');
  }
 )

 for(i=0;i<editButtons.length;i++){
  jQuery('.'+editButtons[i][0]).css('background-image','url('+imagesUrl+editButtons[i][1]+')');
  jQuery('.'+editButtons[i][0]).attr('rel',i);
  jQuery('.'+editButtons[i][0]).hover(
   function(){
    jQuery(this).css('background-image','url('+imagesUrl+editButtons[jQuery(this).attr('rel')][2]+')');
   },
   function(){
    jQuery(this).css('background-image','url('+imagesUrl+editButtons[jQuery(this).attr('rel')][1]+')');
   }
  );
 } 
 
 jQuery('.submit').mouseover(function() {
   jQuery(this).hover(
     function() {
       jQuery(this).css('background-color', '#333');
     },
     function() {
       jQuery(this).css('background-color', '#6B6B6B');
     }
   );    
 });
 
 if(jQuery('#link-contact-form')[0]) {   
   jQuery('#link-contact-form').click(function(event) {
     event.preventDefault();
     jQuery('#form-contact-wrapper').slideToggle('slow');   
   });  
 }
 
 jQuery('#menu ul li:not(.active)').each(function() {
   if(!jQuery(this).prev().hasClass('active')) {
     jQuery(this).css('background-image', 'url(../images/separator.gif)');
   }
 });  
});