/* Liteonmobile UI */
/*
$(document).ready(function(){
$('a#attachDocument').click(function() {
	$('#addFile').css("display","block");
	});
});*/

$(document).ready(function(){
  $('div.attribute-image').hover(
    function() {
      if ( $(this).hasClass("highlight") ) {
        $(this).addClass("attribute-image-hover");
        $(this).children().children('img.zoom-image').show();
      }
    }, 
    function() {
      if ( $(this).hasClass("highlight") ) {
        $(this).removeClass("attribute-image-hover");
        $(this).children().children('img.zoom-image').hide();
      }
    }
  );
  
    bindHighSlideAjax();
  bindHighSlideImage();
  
});

function bindHighSlideAjax() {
  $('a.highslideAjax').each(function() {
    this.onclick = function() {
      var ssGroup = $(this).attr('rel');
      var options = '';
      
      if(ssGroup == 'ajax'){
        options = ajaxOptions;
      }
      
      if(options != ''){
        return hs.htmlExpand( this, options );
      } else {
        return hs.htmlExpand( this );
      }
    };
  });
}

function bindHighSlideImage() {
  $('a.highslideImage').each(function() {
    this.onclick = function() {
      var ssGroup = $(this).attr('rel');
      var options = '';
      
      if(ssGroup == 'gallery'){
        options = galleryOptions;
      } else if(ssGroup == 'content') { 
        options = contentOptions;
      }
      
      if(options != ''){
        return hs.expand( this, options );
      } else {
        return hs.expand( this );
      }
    };
  });
}