$(document).ready(function() {
   // Live
  $('#menue ul#ebene01 > li:last-child a,div.leftCol div:eq(4)').addClass("last");

/*
   if ($('.nav').html() != null) {
        // Navausklappen / Cluetip ----------------------------------------
        $.ajax({
            type: 'GET',
            url: '/site/de/js/superfish.js',
            success: function() {              
                $(".nav").superfish({
                            animation : { opacity:"show",height:"show"}
                           });
                $("#main-nav li>ul").parent("li").addClass("sub-active");
                $("#main-nav li.first-row").removeClass();
              },
            dataType: 'script',
            cache: true
        });
    }

   if ($('.fancybox').html() != null ) {
        // fancybox ----------------------------------------
        $.ajax({
            type: 'GET',
            url: '/obo_bettermann/js/jquery.fancybox-1.3.1.pack.js',
            success: function() {
                if ($('.fancybox').html() != null) {
                    $(".fancybox").fancybox({
                    'frameWidth': 350,
                    'frameHeight': 400,
                    'padding':0,
                    'centerOnScroll': false,
                    'hideOnContentClick': false});
                }
            },
            dataType: 'script',
            cache: true
        });
    }


    if ($('.faq').html() != null) {
        // FAQ ----------------------------------------
        $.ajax({
            type: 'GET',
            url: '/site/de/js/jquery.faq.js',
            success: function() {
                $('.faq').makeFAQ({
                indexTitle: "",
                displayIndex: false,
                faqHeader: "h2"
            });            
            },
            dataType: 'script',
            cache: true
        });
    }



    if ($('.alpha-nav').html() != null) {     
        // Schuh ABC ----------------------------------------
        $.ajax({
            type: 'GET',
            url: '/site/de/js/jquery_quicksearch.js',
            success: function() {
                $.fn.clearForm = function() {
                    return this.each(function() {
                    var type = this.type, tag = this.tagName.toLowerCase();
                    if (tag == 'form')
                        return $(':input',this).clearForm();
                    if (type == 'text' || type == 'password' || tag == 'textarea')
                        this.value = '';        
                    else if (type == 'checkbox' || type == 'radio')
                        this.checked = false;        
                    else if (tag == 'select')
                        this.selectedIndex = -1;
                    });
                };
                $("ul.alpha-nav li a").click(function() {
                    $(this).parent().addClass("active");
                    $(this).parent().siblings().removeClass("active");
                    var getID = $(this).attr("rel");
                    if (getID != 'a-z') {
                        $("ul.list." + getID).show();
                        $("ul.list." + getID).siblings().hide();
                        return false;
                    } else {
                        $('ul.list').show();
                        return false;
                    };
                });
            
                $('ul.list li').quicksearch({
                    position: 'prepend',
                    attached: '.quick-form',
                    loaderImg: null,
                    labelText: 'Suchbegriff:',
                    loaderText: '',
                    delay: 100
                });
            
                //reset form
                $('#delete').click(function() {
                    $('.qs_input').clearForm();
                    $('ul.list li').show();
                    return false;
                });
    
                $("a.load-local").cluetip({
                    local:true,
                    cursor: 'pointer',
                    positionBy: 'fixed',
                    sticky: 'true',
                    dropShadowSteps: 3,
                    cluetipClass: 'finder',
                    closeText: '',
                    arrows: true,
                    closePosition: 'title',
                    mouseOutClose: 'true',
                    topOffset: 2,
                    leftOffset: 20,
                    width: 200,
                    fx: {             
                        open: 'fadeIn'
                    },
                    hoverIntent: {    
                        interval: 100
                    }
                });
            },
            dataType: 'script',
            cache: true
        });
    }
*/
	
	isIE = (navigator.userAgent.indexOf("MSIE") != -1)
	if (isIE) {
		$("input[type='radio']").css({"position":"relative","top":"5px","border":"none"});
	}

/*	
	$('a').each(function() {
	    if($(this).attr('rel') == "prettyPhoto") {
			$(this).prettyPhoto();
		}
	  });
*/	
	
//	$("a[rel^='prettyPhoto']").prettyPhoto();
});

function open_catalog(catalog) {
  width=920;
  height = 625;
  pdw=open("http://www.deichmann.de/catalog/index.php?lang=lang" + catalog.substring(0, 6) + "&cat=" + catalog,"pdw","width=" + width + ",height=" + height + ",toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizeable=no,copyhistory=no,menubar=no");
}

function popup(pname, width, height, scrollbars) {
  msg=open(pname,"pname","width=" + width + ",height=" + height + ",toolbar=no,location=no,directories=no,status=no,scrollbars=" + scrollbars + ",resizeable=no,menubar=no");
}

function open_product(artnumber) {
  window.location="?artnumber="+artnumber;
}

function open_category(categoryid) {
  window.location="?category="+categoryid;
}
