// Downloadbox
function init_DownloadList(){

    $(".download_list li a.download_opener").removeAttr('href');

    $(".download_list li").click( function(){
        $('span.download_info',this).slideToggle(300);
        $(this).toggleClass('clicked');
    });

    $(".download_list a.download").mouseover( function(){
        $(this).parents('li').eq(0).unbind("click");
    });

    $(".download_list a.download").mouseout( function(){
        $(this).parents('li').eq(0).bind("click", function(){
            $('span.download_info',this).slideToggle(300);
            $(this).toggleClass('clicked');
        });
    });
}

$(function () {

    $ ('.product_head .product_images a').each(function() {

        var $this = $(this);
        var url = $this.attr('href');
        var parent = $this.parent();
        var siblings = $this.siblings();
        $this.attr('href', '#');

        $this.click(function(){
            parent.css('background-image', 'url('+url+')');
            siblings.removeClass('current');
            $this.addClass('current');
            return false;
        });

    })
    
	var h = window.location.host.toLowerCase();
	$("a[href^='http']:not(a[href^='http://" + h + "']):not(a[href^='http://www." + h + "']), a:not([href$='.html'])").attr("target", "_blank");


});
