    $(function() {

        /** check url and pre-select item **/
        function init_registration_parsing() {
            var form_contact = document.getElementById('form_contact');
            if(form_contact) {
                var el = form_contact.getElementsByTagName('*');
                var url = document.location.href;
                var params = url.split('submit_publication=');
                var publication = params[1];
                if(publication) {
                    var targetclass = 'publication' + publication;
                    for(i=0; i<el.length; i++) {
                        if(el[i].className.indexOf(targetclass) > -1) {
                            el[i].checked = true;
                        }
                    }
                }
            }
        }
        
        init_registration_parsing();

        $('.accordion li a').each(function() {
            $(this).click(function(e) {
                window.open(this.href);
            });
        });
 
         
         
        $('h3.toggler').each(function() {        
            $(this).click(function(){
                if( !$(this).hasClass("active") ) {
                    $(this).addClass("active"); 
                }
                else {
                    $(this).removeClass("active");
                }
            });
        });
 
        if($('.accordion').length) {
            $('.accordion').accordion({ autoheight: false, active: false, alwaysOpen: false, header: 'h3.toggler' });
        }
      });    
