function weiter(url){
    if (confirm(lang_con)){
        document.location.href = url;
    }
}


function openPop(w, h, url, status, scrollbars, resize){
	fenster=window.open(url, "fenster", "width="+w+",height="+h+",status="+status+",scrollbars="+scrollbars+",resizable="+resize+"");
	fenster.focus();
}


$(function(){

    $('.jq-cbpop').colorbox({opacity:'0.7', width:'550px', height:'300px', iframe:true});
    $('.jq-abuse').colorbox({opacity:'0.7', width:'450px', height:'320px', iframe:true});
    $('.jq-abuse-bk').colorbox({opacity:'0.7', width:'450px', height:'320px', iframe:true});
    $('.jq-email').colorbox({opacity:'0.7', width:'500px', height:'600px', iframe:true});
    $('.jq-addtogalerie').colorbox({opacity:'0.7', width:'800px', height:'550px', iframe:true});
    $('.jq-followuser').colorbox({opacity:'0.7', width:'550px', height:'320px', iframe:true});

	$('.galbild').hover(
		function(){
			$(this).find('.imgoptbox').fadeIn("fast");
		}, 
		function(){
			$(this).find('.imgoptbox').hide();
		}
	);
	
	$('.jq-tabic').live('mouseover mouseout', function(event) {
		if (event.type == 'mouseover') {
			$(this).addClass('tabtr-hover');
		}else{
			$(this).removeClass('tabtr-hover');
		}
	});		
	
    $('.jq-ctext').keyup(function(){
    
        var cl, ml, al, nl, av, jdiv;
                
        jdiv = '.jq-ctextdiv';
                
        cl = $(jdiv).attr('className');
                
        ml = cl.replace(/.*?jq-textlen-([0-9]+).*/, '$1');
        ml = parseInt(ml);
        ml = ml ? ml : 250;
                
        al = $(this).val().length;
        nl = ml-al;
              
        if(al <= ml){
                    
            $(jdiv).html(nl + ' ' + lang_chl);
        			
  		}else{
        			
            av = $(this).val();
            av = av.substr(0,ml);
            $(this).val(av);
            $(jdiv).html(lang_che);
        		
        }
     
    });   

});