/*
 * Dominik Heussen www.dominik-h.de 20.10.2010
 */

jQuery.noConflict();

jQuery('document').ready(function(){
    drawArrows();
    linkRss();
});

jQuery(window).resize(function(){
    jQuery('.header-arrow').remove();
    drawArrows();
});

function drawArrows(){
    jQuery('#box-light .csc-firstHeader').each(function(){
        placeArrow(jQuery(this));
    });
    jQuery('#box-dark  .csc-firstHeader').each(function(){
        placeArrow(jQuery(this));
    });
    jQuery('.news-list-item h2').each(function(){
        placeArrow(jQuery(this));
    });
}

function placeArrow(parent){
    var arrow = document.createElement("div");
    arrow.className = "header-arrow";
    arrow.style.top = (parent.offset().top - 19)+"px";
    arrow.style.left = (parent.offset().left -19)+"px";
    jQuery('body').append(arrow);
}

function linkRss()
{
    jQuery('#pic img').each(function(){
        if(jQuery(this).attr("title") == "RSS"){
            jQuery(this).click(function(){
                window.location='feed://c-g-w.net/index.php?type=100';
            });
            jQuery(this).css("cursor","pointer");
        }
    });
}
