function extended_contact(){jQuery("#contact_extended #extended_success").hide();jQuery("#contact_extended #extended_error").hide();jQuery("#extended_contact").submit(function(a){jQuery("#contact_extended #extended_contact").hide();jQuery("#contact_extended #extended_error").hide();jQuery("#contact_extended .loader").show();a.preventDefault();var b=jQuery(this).serialize();jQuery.ajax({type:"POST",cache:false,url:"/wp-admin/admin-ajax.php",data:"action=extended&"+b,success:function(a){jQuery("#contact_extended").ajaxComplete(function(b,c,d){if(a=="success"){jQuery("#contact_extended #extended_error").hide();jQuery("#contact_extended #extended_success").fadeIn("slow");jQuery("#contact_extended .loader").hide()}else{jQuery("#contact_extended #extended_success").hide();result=a;jQuery("#contact_extended #extended_error").html(result);jQuery("#contact_extended #extended_error").fadeIn("slow");jQuery("#contact_extended #extended_contact").fadeIn("slow");jQuery("#contact_extended .loader").hide()}jQuery("html, body").animate({scrollTop:jQuery("#contact_extended #extended_error").offset().top},2e3)})}});return false})}function contact_form(){jQuery(".contact_form #contact_success").hide();jQuery(".contact_form #contact_error").hide();jQuery("#contact_form").submit(function(a){jQuery(".contact_form #contact_form").hide();jQuery(".contact_form #contact_error").hide();jQuery(".contact_form .loader").show();a.preventDefault();var b=jQuery(this).serialize();jQuery.ajax({type:"POST",cache:false,url:"/wp-admin/admin-ajax.php",data:"action=contact&"+b,success:function(a){jQuery(".contact_form").ajaxComplete(function(b,c,d){if(a=="success"){jQuery(".contact_form #contact_error").hide();jQuery(".contact_form #contact_success").fadeIn("slow");jQuery(".contact_form .loader").hide()}else{jQuery(".contact_form #contact_success").hide();result=a;jQuery(".contact_form #contact_error").html(result);jQuery(".contact_form #contact_error").fadeIn("slow");jQuery(".contact_form #contact_form").fadeIn("slow");jQuery(".contact_form .loader").hide()}jQuery("html, body").animate({scrollTop:jQuery(".contact_form #contact_error").offset().top},2e3)})}});return false})}function webdesign_test(){jQuery("a.start_test").bind("click",function(){jQuery(".webdesign_test").bPopup();return false});jQuery("#webdesign_test").load("http://www.iwebix.de/wp-content/themes/iwebix/test.php",null,function(){Cufon.refresh();jQuery(".webdesign_test .result").hide();jQuery(".webdesign_test .success_close").hide();jQuery(".webdesign_test .error").hide();jQuery("#designer").submit(function(){var a=jQuery(this).serialize();jQuery.ajax({type:"POST",url:"/wp-admin/admin-ajax.php",data:"action=test&"+a,success:function(a){jQuery("#was_passt").ajaxComplete(function(b,c,d){var e=jQuery.parseJSON(a);var f=e.success;if(f=="true"){var g=e.result;var h=e.shop;var i=e.blog;var j="";jQuery(".the_test").hide();jQuery(".webdesign_test .result").fadeIn();if(e.result==1){jQuery("#anfrage_betreff").val("Dynamisches Webdesign")}else{jQuery("#anfrage_betreff").val("Statisches Webdesign")}jQuery(".result .ergebnis").hide();jQuery(".result #ergebnis_"+g).show();if(h=="true"){jQuery(".result #shop").show();j+="shop "}if(i=="true"){jQuery(".result #blog").show();j+="blog"}jQuery("#anfrage_infos").val(j)}else{var k=e.error;result=k;jQuery("#test_error").html(result);jQuery("html, body").animate({scrollTop:0},"slow");jQuery("#test_error").fadeIn("slow")}})}});return false});jQuery(".test_angebot #anfrage_success").hide();jQuery(".test_angebot #anfrage_error").hide();jQuery("#test_angebot").submit(function(){var a=jQuery(this).serialize();jQuery.ajax({type:"POST",url:"/wp-admin/admin-ajax.php",data:"action=contact&"+a,success:function(a){jQuery("#was_passt").ajaxComplete(function(b,c,d){if(a=="success"){jQuery(".test_angebot #anfrage_error").hide();jQuery(".result").hide();jQuery("html, body").animate({scrollTop:0},"slow");jQuery(".success_close").fadeIn("slow")}else{result=a;jQuery(".test_angebot #anfrage_error").html(result);jQuery("html, body").animate({scrollTop:0},"slow");jQuery(".test_angebot #anfrage_error").fadeIn("slow")}})}});return false})})}function menu_out(){jQuery(this).find(".sub").stop().fadeTo("fast",0,function(){jQuery(this).hide()});jQuery(this).find("a").removeClass("hover")}function menu_over(){jQuery(this).find(".sub").stop().fadeTo("fast",1).show();jQuery(this).find(".sub-menu").show();jQuery(this).find("a").addClass("hover")}function nav(){jQuery("#nav > li.menu-item > ul.sub-menu").wrap('<div class="sub" />');jQuery(".sub").prepend('<div class="sub_top"></div>');jQuery(".sub-menu").wrap('<div class="sub_repeat" />');jQuery(".sub").append('<div class="sub_btm"></div>');jQuery(".sub ul li a").css("color","#FFF");jQuery("ul#nav li .sub").css({opacity:"0"});jQuery("ul#nav li").hoverIntent(config)}function referenz_slider(){jQuery(".big_overlay").hide();slider_num=jQuery(".referenz").size();jQuery(".referenz").each(function(a){a=a+1;jQuery(".big_"+a+" ul li").hide();jQuery(".big_"+a+" ul li:first-child").show();jQuery(".big_"+a).hover(function(){jQuery(".overlay_"+a).fadeIn()},function(){jQuery(".overlay_"+a).fadeOut();jQuery(".big_overlay").hide()});jQuery(".thumbs_"+a+" ul li").click(function(){jQuery(".big_"+a+" ul li").hide();var b=jQuery(this).attr("title");b=parseInt(b);jQuery(".big_"+a+" ul li:nth-child("+b+")").fadeIn()});jQuery(".thumbs_"+a+" ul").carouFredSel({items:3,scroll:{duration:600},auto:false,prev:{button:".prev_"+a,key:"left"},next:{button:".next_"+a,key:"right"}})})}function post_gallery(){jQuery("ul#post_gallery").carouFredSel({items:{visible:3},scroll:{items:1,duration:400},auto:false,prev:{button:"#prev_post",key:"left"},next:{button:"#next_post",key:"right"}})}function news_slider(){jQuery("ul#news_slider").carouFredSel({direction:"up",items:{visible:1},scroll:{items:1,duration:400},auto:false,prev:{button:"#prev_news",key:"left"},next:{button:"#next_news",key:"right"}})}function logo_slider(){jQuery("ul#slider").carouFredSel({items:{visible:4,width:"variable"},scroll:{items:1,duration:600},auto:{pauseDuration:5e3,pauseOnHover:true},prev:{button:"#prev_slide",key:"left"},next:{button:"#next_slide",key:"right"}})}function content_slider(){}function slideshow(){var a="fade";if(jQuery.browser.msie&&jQuery.browser.version.substr(0,1)<8){a="uncover"}jQuery.getJSON("http://www.iwebix.de/wp-content/themes/iwebix/slideshow.php",function(b){for(var c=1;c<7;c++){jQuery("#slideshow ul").append('<li><img src="'+b[c]["src"]+'" alt="" /><a href="'+b[c]["href"]+'"><span class="slideshow_img"></span></a><div class="slideshow_text"><a class="iwebix_font slide_title" href="'+b[c]["href"]+'" title="'+b[c]["title"]+'">'+b[c]["title"]+"</a><p>"+b[c]["desc"]+'</p><span class="more"><a class="iwebix_font" href="'+b[c]["href"]+'" title="'+b[c]["title"]+'">mehr erfahren</a></span></div></li>')}Cufon.refresh();jQuery("#slideshow ul").cycle({fx:a,prev:"#prev",next:"#next",speed:800,timeout:8e3,pager:null})});jQuery("#resume").hide();jQuery("#pause").click(function(){jQuery("#slideshow ul").cycle("pause");jQuery(this).hide();jQuery("#resume").show()});jQuery("#resume").click(function(){jQuery("#slideshow ul").cycle("resume");jQuery("#resume").hide();jQuery("#pause").show()})}function light_box(){jQuery("ul#big_images").each(function(a){a=a+1;jQuery("a[rel=full_view_"+a+"]").fancybox({transitionIn:"none",transitionOut:"none",titlePosition:"over"})});jQuery("a[rel=full_view]").fancybox({transitionIn:"none",transitionOut:"none",titlePosition:"over"})}function effects(){jQuery("#contact_now a").mouseover(function(){jQuery(this).animate({top:"-=10px"},"fast")}).mouseout(function(){jQuery(this).animate({top:"+=10px"},"fast")});jQuery(".googleplus, .facebook").mouseover(function(){jQuery(this).animate({top:"-=25px"},"fast")}).mouseout(function(){jQuery(this).animate({top:"+=25px"},"fast")});jQuery("#sidebar_left h3:first").addClass("first");jQuery(".lazy").lazyload({placeholder:"grey.gif",effect:"fadeIn"});jQuery(jQuery(".content_pre").html()).appendTo("#content_slider");jQuery(".content_pre").hide();jQuery("#content_slider .slider").cycle({fx:"scrollLeft",prev:"#prev_content",next:"#next_content",speed:800,pager:null}).cycle("pause")}jQuery(document).ready(function(a){nav();effects();slideshow();logo_slider();news_slider();content_slider();referenz_slider();webdesign_test();contact_form();post_gallery();extended_contact();light_box()});var config={sensitivity:2,interval:100,over:menu_over,timeout:200,out:menu_out}
