$(function() {
  
  $('#homepage #images').dpg_scale_images({
    scale_percentage: 100,
    scale_axis: 'y',
    min_width: 200,
    min_height: 200,
    max_width: 9999,
    max_height: 9999,
    width_deduction: 180,
    height_deduction: 0,
    fill_container: true,
    set_visibility: true
  });
  
  $('#gallery #images').dpg_scale_images({
    scale_percentage: 100,
    scale_axis: 'y',
    min_width: 200,
    min_height: 200,
    max_width: 9999,
    max_height: 9999,
    width_deduction: 180,
    height_deduction: 0,
    fill_container: false,
    set_visibility: true,
    add_overflow_x: true
  });
  
  $('#about #images').dpg_scale_images({
    scale_percentage: 100,
    scale_axis: 'y',
    min_width: 200,
    min_height: 200,
    max_width: 9999,
    max_height: 9999,
    width_deduction: 180,
    height_deduction: 0,
    fill_container: true,
    set_visibility: true
  });
  
  $('#contact #images').dpg_scale_images({
    scale_percentage: 100,
    scale_axis: 'y',
    min_width: 200,
    min_height: 200,
    max_width: 9999,
    max_height: 9999,
    width_deduction: 180,
    height_deduction: 0,
    fill_container: true,
    set_visibility: true
  });
  
  $('#images').dpg_protect_images({
    disable_right_click: true,
    image_overlay: true
  });
  
  $('#gallery #images div.image_list.first').dpg_side_scroll_gallery({
    width: 1000,
    left_margin: 0,
    right_margin: 0,
    horizontal_spacing: 0,
    fullscreen: true
  });
  
  $('#gallery .image.information').each(function() {
    if ($(this).length > 0) {
      $(this).show();
    }
  });
  
  $('#gallery #images').dpg_mouse_scroll();
  
  $(window).scroll(function()
                   {
                     if ($(window).scrollLeft() > $('#sidebar').width())
                     {
                       $('#sidebar').fadeOut(600);
                     }
                     else
                     {
                       $('#sidebar').fadeIn(600);
                     }
                   });
  
  
  
  
  
});

