﻿// Catalog für die Startseite
$(document).ready(function() {

    $(".shop_startkachel:eq(0)").mouseover(function() {
        $(this).find('img').addClass('shopimgopacity');
        $(this).addClass('shop_startkachel_rot');
    }).mouseout(function() {
        $(this).find('img').removeClass('shopimgopacity');
        $(this).removeClass('shop_startkachel_rot');
    });
    $(".shop_startkachel:eq(1)").mouseover(function() {
        $(this).find('img').addClass('shopimgopacity');
        $(this).addClass('shop_startkachel_blau');
    }).mouseout(function() {
        $(this).find('img').removeClass('shopimgopacity');
        $(this).removeClass('shop_startkachel_blau');
    });
    $(".shop_startkachel:eq(2)").mouseover(function() {
        $(this).find('img').addClass('shopimgopacity');
        $(this).addClass('shop_startkachel_gruen');
    }).mouseout(function() {
        $(this).find('img').removeClass('shopimgopacity');
        $(this).removeClass('shop_startkachel_gruen');
    });
    $(".shop_startkachel:eq(3)").mouseover(function() {
        $(this).find('img').addClass('shopimgopacity');
        $(this).addClass('shop_startkachel_gruen');
    }).mouseout(function() {
        $(this).find('img').removeClass('shopimgopacity');
        $(this).removeClass('shop_startkachel_gruen');
    });
    $(".shop_startkachel:eq(4)").mouseover(function() {
        $(this).find('img').addClass('shopimgopacity');
        $(this).addClass('shop_startkachel_gruen');
    }).mouseout(function() {
        $(this).find('img').removeClass('shopimgopacity');
        $(this).removeClass('shop_startkachel_gruen');
    });

});
// Catalog für die Shop_overview
$(document).ready(function() {

    $(".shop_overviewkachel").mouseover(function() {
        //$(this).css({ 'border': 'solid 1px #ccc' });
        $(this).addClass('shop_overviewkachel_hover');
        $(this).find(".quickinfo").css({ 'display': 'inline' });

    }).mouseout(function() {
        $(this).removeClass('shop_overviewkachel_hover');
        $(this).find(".quickinfo").css({ 'display': 'none' });
    });   
    
     $(".articleContainer").mouseover(function() {
        //$(this).css({ 'border': 'solid 1px #ccc' });
        $(this).addClass('articleContainerhover');
       

    }).mouseout(function() {
        $(this).removeClass('articleContainerhover');
       
    });   
    
});


// Artikeübersicht
function showQuickInfo(Id) {
        $("." + Id).overlay({

            // custom top position
            top: 264,

            // some expose tweaks suitable for facebox-looking dialogs
            expose: {

                // you might also consider a "transparent" color for the mask
                color: '#fff',

                // load mask a little faster
                loadSpeed: 200,

                // highly transparent
                opacity: 0.3
            },

            // disable this for modal dialog-type of overlays
            closeOnClick: true,

            // we want to use the programming API
            api: true

            // load it immediately after the construction
        }).load();
    }


// TOOLS
function centershopimages() {
   var imgs = $(".artimg_143")
   var temp
   for(x=0;x<imgs.length;x++) {
        if (imgs[x].height<136 &&  imgs[x].height>0) {
           //alert(imgs[x].height)
           temp = parseInt((136 - imgs[x].height) / 2)
           imgs[x].style.paddingTop=temp  + 'px'
           
        }
    }
}



