/*(c) s.oehrl@esz-ag.de 2009*/(function($j){$j.fn.newsTicker=$j.fn.newsticker=function(_2){_2=_2||4000;initTicker=function(el){stopTicker(el);el.items=$j("li",el);el.items.not(":eq(0)").hide().end();el.currentitem=0;startTicker(el);};startTicker=function(el){el.tickfn=setInterval(function(){doTick(el);},_2);};stopTicker=function(el){clearInterval(el.tickfn);};pauseTicker=function(el){el.pause=true;};resumeTicker=function(el){el.pause=false;};doTick=function(el){if(el.pause){return;}el.pause=true;$j(el.items[el.currentitem]).fadeOut("slow",function(){$j(this).hide();el.currentitem=++el.currentitem%(el.items.size());$j(el.items[el.currentitem]).fadeIn("slow",function(){el.pause=false;});});};this.each(function(){if(this.nodeName.toLowerCase()!="ul"){return;}initTicker(this);}).addClass("newsticker").hover(function(){pauseTicker(this);},function(){resumeTicker(this);});return this;};})(jQuery);var $j={};$j = jQuery.noConflict();var $ = {};function loadl(seite,target){$j("#loader_img").show();dynload(seite,target);};function dynload(seite,target){/*.html abschneiden*/seite = seite.substring(0,seite.length-5);$j.ajax({url: "loader.php",type: "POST",data: {seite:seite},cache: false,dataType:"html",success: function(html){var output=html.split('[break]');$j("#col1_content").fadeIn("slow");$j("#loader_img").hide();$j("#col1_content").html(output[0]);$j("a").unbind('click');if(output[1]!='none'){$j.getScript("http://static1.esz-ag.de/inc/"+output[1]+".js");}pageTracker._trackPageview(seite+".html"); if(target!=null && seite=="news"){try{var divOffset = $j('#col1_content').offset().top; var pOffset = $j('#col1_content a[name='+target+']').offset().top;var pScroll = pOffset - divOffset;$j('#col1_content').animate({scrollTop: '+=' + pScroll + 'px'});}catch(e){}}else{$j('#col1_content').animate({scrollTop: '-=10000px'});}} });};$j(function(){/*Ajax-Loader gif setzen*/$j("#loader_img").css({left:Math.round($j(document).width()/2)+"px"});$j("#bildscroller").append("<li><img src='http://images.esz-ag.de/scroll_img_1.png' alt=''/></li>");$j("#bildscroller").append("<li><img src='http://images.esz-ag.de/scroll_img_2.png' alt=''/></li>");$j("#bildscroller").append("<li><img src='http://images.esz-ag.de/scroll_img_3.png' alt=''/></li>");$j("#bildscroller").append("<li><img src='http://images.esz-ag.de/scroll_img_4.png' alt=''/></li>");$j("#bildscroller").append("<li><img src='http://images.esz-ag.de/scroll_img_5.png' alt=''/></li>");$j("#bildscroller").append("<li><img src='http://images.esz-ag.de/scroll_img_6.png' alt=''/></li>");$j("#bildscroller").append("<li><img src='http://images.esz-ag.de/scroll_img_7.png' alt=''/></li>");$j("#bildscroller").newsTicker(4000);$j("#cse-search-box-top input[type=text]").focus(function(){$j(this).val("")});});var xmlResult;$j.ajax({type: "GET",url: "inhalte/kontakt.xml",dataType: "xml",success: function(result){xmlResult=$j(result).find(sprache);}});$j(function(){$j("span.bshow").wrap("<button></button>");$j("span.bshow").parent().attr("class","bshow").click(function(){location.href=$j(this).parent().attr("href");});$j(".contForm form").submit(function(e){var output="";if($j(".contForm form input[name=nname]").val()==""){output+=$j(xmlResult).find("name_fehlt").text();}if($j(".contForm form input[name=email]").val()==""){if(output!="")output+="\n";output+=$j(xmlResult).find("email_fehlt").text();}if(output!=""){alert(output);e.preventDefault();}});/*$j(".contForm form").submit(function(e){e.preventDefault();$j("#loader_img").show();$j.ajax({type: "POST",url: "kontakt.html",data: {nname:$j(".contForm form input[name=nname]").val(),vname:$j(".contForm form input[name=vname]").val(),anrede:$j(".contForm form input[name=anrede]").val(),abteilung:$j(".contForm form input[name=plz]").val(),email:$j(".contForm form input[name=email]").val(), nachricht:$j(".contForm form textarea[name=nachricht]").val(), bestandskunde:$j(".contForm form input[name=bestandskunde]:checked").val(), kundennummer:$j(".contForm form input[name=kundennummer]").val(), telefon:$j(".contForm form input[name=telefon]").val(), fax:$j(".contForm form input[name=fax]").val(),firma:$j(".contForm form input[name=firma]").val(), al1:$j(".contForm form input[name=al1]").is(":checked"),al2:$j(".contForm form input[name=al2]").is(":checked"),al3:$j(".contForm form input[name=al3]").is(":checked"),al4:$j(".contForm form input[name=al4]").is(":checked"),al5:$j(".contForm form input[name=al5]").is(":checked"),al6:$j(".contForm form input[name=al6]").is(":checked"),al7:$j(".contForm form input[name=al7]").is(":checked"),al8:$j(".contForm form input[name=al8]").is(":checked"),submitForm:"js"},success: function(result){$j("#loader_img").hide();var output=result.split("[break]");if(output[0]==false){alert(output[1]);}else{/*alert(output[1]);$j(".contForm form input[name=vname]").val("");$j(".contForm form input[name=nname]").val("");$j(".contForm form input[name=anrede]").val("");$j(".contForm form input[name=plz]").val("");$j(".contForm form input[name=email]").val("");$j(".contForm form textarea[name=nachricht]").val("");$j(".contForm form input[name=bestandskunde]:checked").val("");$j(".contForm form input[name=kundennummer]").val("");$j(".contForm form input[name=telefon]").val("");$j(".contForm form input[name=fax]").val("");$j(".contForm form input[name=firma]").val("");$j(".contForm form input[name=al1]").attr("checked","");$j(".contForm form input[name=al2]").attr("checked","");$j(".contForm form input[name=al3]").attr("checked","");$j(".contForm form input[name=al4]").attr("checked","");$j(".contForm form input[name=al5]").attr("checked","");$j(".contForm form input[name=al6]").attr("checked","");$j(".contForm form input[name=al7]").attr("checked","");$j(".contForm form input[name=al8]").attr("checked","");} } });}); */ }); 