$(function(){var back1=$(".back1").first();var back_position=back1.position();$(window).load(function(){$(".pre_con").fadeOut();});$("#search_btn").click(function(){search_text=$("#search_box").val().split("%20").join("");search_text=search_text.split(" ").join("");if(search_text!=''){window.location.href="http://localhost/mix3rbiaat/search/"+search_text;}else{alert("ادخل كلمة البحث");}});$("#search_box").click(function(){});$('#search_box').keypress(function(event){var keycode=(event.keyCode?event.keyCode:event.which);if(keycode=='13'){search_text=$("#search_box").val().split("%20").join("");search_text=search_text.split(" ").join("");if(search_text!=''){window.location.href="http://localhost/mix3rbiaat/search/"+search_text;}else{alert("ادخل كلمة البحث");}}});$(".sub").click(function(){if($(this).attr("status")=='opened'){$(this).parent().next().slideUp();$(this).attr("status",'closed');$(this).removeClass('sub_close');$(this).addClass('sub_open');}else{$(this).parent().next().slideDown();$(this).removeClass('sub_open');$(this).addClass('sub_close');$(this).attr("status",'opened');}});$(".nav_btn").click(function(){$('body').animate({scrollTop:$(".slider_part").offset().top},500);});$("#to_top").click(function(){$('body').animate({scrollTop:$(".full-page").offset().top},2000);});});