$(document).ready(function(){
	var url = window.location.pathname;
	// console.log("url= %s", url);
	if( url.indexOf('/coID/10/') > -1 ||
		url.indexOf('/coID/11/') > -1 ||
		url.indexOf('/coID/12/') > -1 ||
		url.indexOf('/coID/13/') > -1 ||
		url.indexOf('/coID/14/') > -1 ){
			$('li#li_content_11').css('display', 'block');
			$('li#li_content_12').css('display', 'block');
			$('li#li_content_13').css('display', 'block');
			$('li#li_content_14').css('display', 'block');
		}
	if( url.indexOf('/coID/17/') > -1 ||
		url.indexOf('/coID/18/') > -1 ||
		url.indexOf('/coID/19/') > -1 ||
		url.indexOf('/coID/20/') > -1 ){
			$('li#li_content_18').css('display', 'block');
			$('li#li_content_19').css('display', 'block');
			$('li#li_content_20').css('display', 'block');
		}
	if( url.indexOf('/products_new.php') > -1){
			$('li#products_new').addClass('activeCat');
		}

	contentIDs = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21".split(",")
	for (var i=0; i < contentIDs.length; i++) {
		eval('if( url.indexOf("/coID/'+contentIDs[i]+'/") > -1 ){ $("a#content_'+contentIDs[i]+'").addClass("active"); }');		
	};
	$('font[color=#ff0000]').attr('color', '#9A263B').css('font-weight', '700').css('text-decoration', 'none');
	
    var getC = $.cookies.get('startCookie');
    if (getC == null) {
        $('div.daily_message_block').css('display','block');
    } else {
        $('div.daily_message_block').css('display','none');
    }
    $('div.daily_message_block').bind('click', function () {
        $.cookies.set('startCookie','startCookie');
        $(this).css('display','none');
    });
    
    $('#main_content a').each(function () {
        href = $(this).attr('href');
        if (typeof href!='undefined' && href.indexOf('#') == 0) {
            $(this).attr('href', document.location.href + href);
        }; 
    });

});

function hide(id){
    $(document).ready(function () {
        $('#'+id).css('display', 'none');
    });    
}

function mail_me(){document.location.href='mailto:info'+'@'+'Hexentruhe.at?subject=Anfrage%20aus%20der%20Truhe';}

