var jQ = jQuery.noConflict();

var extLink = {
    init : function() {
        jQ('a[type=ext]').attr('target','_blank');
    }
}

jQ(document).ready(function(){    

    
    extLink.init();

// Tablesorter
    jQ("#locator").tablesorter({sortList:[[0,0],[2,1]], widgets: ['zebra']});

    //iWantToUseSomeAjax.init();

    //OVERIG
    jQ("#pickabrand li").hover(
        function(){
            jQ(this).addClass('active');
        },
        function(){
            jQ(this).removeClass('active');
        }
    );
    
    //pulldowns in navigatie
    jQ(".nav").hover(
        function(){ 
            jQ(".subnav", this).fadeIn("fast"); 
            jQ(".subnav", this).css("display", "block"); 
        },
        function(){ 
            jQ(".subnav", this).fadeOut("fast"); 
            jQ(".subnav", this).css("display", "none"); 
        }
    );
	
    //pop-up tonen met collectie info
    jQ('img.cloudcarousel').live('mouseover',function(){
        if(jQ(this).width() > '180' && jQ(this).height() > '70'){
            jQ(this).nextAll('div.brand-content:first').css('display','block');
        }
    });

    //pop-up tonen met collectie info
    jQ('img.cloudcarousel').live('click',function(){
        if(jQ(this).width() > '180' && jQ(this).height() > '70'){
            jQ(this).nextAll('div.brand-content:first').css('display','block');
        }
    });

    jQ('div.brand-content a.closeme').live('click',function(){
        jQ(this).parent().css('display','none');
    });

//    jQ('img.cloudcarousel').live('mouseout',function(){
//        if(jQ(this).width() == '200' && jQ(this).height() == '90'){
//            jQ(this).nextAll('div.brand-content:first').css('display','none');
//        }
//    });

    // This initialises carousels on the container elements specified, in this case, carousel1.
    jQ("#carousel1").CloudCarousel(
        {
            xPos: 128,
            yPos: 32,
            buttonLeft: jQ("#left-but"),
            buttonRight: jQ("#right-but"),
            altBox: jQ("#alt-text"),
            titleBox: jQ("#title-text"),
            reflHeight : 20,
            reflGap : 2,
            reflOpacity: 0.3,
            xPos: 510,
            yRadius : 110,
            xRadius : 520,
            autoRotate : 'left',
            autoRotateDelay : 5000,
            bringToFront : true,
            minScale : 0.25
        }
    );


});   

                                    
