$(document).ready(function() {


	$("#bar_content").cycle();
	$(".printers_content").wrap('<div class="printers_border"></div>');
	$(".printers_border").corner();
	$(".printers_content").corner();
	$("#fast_search").wrap('<div id="fs_border"></div>');
	$("#fs_border").corner();
	$("#fast_search").corner();
	$("#youtube").wrap('<div class="lb_border"></div>');
	$("#binding_block").wrap('<div class="lb_border"></div>');
	$(".lb_border").corner();
	$("#youtube").corner();
	$("#binding_block").corner();
	$("#footer").corner();

	
		$(".slide_likebox").mouseenter(function(){
			$(this).stop(false,false);
			$(this).animate({'right':0},500);
			$(this).css('cursor','alias');
		});
		
		$(".slide_likebox").mouseleave(function(){
			$(this).stop(false,false);
			$(this).animate({'right':-205});
			$(this).css('cursor','pointer');
			
		});		
	
	$(".search_text").focus(function() {
		if ($(this).val() == "חפש")
			$(this).val("");
	});

	$(".search_text").focusout(function() {
		if (($(this).val() == "") || ($(this).val() == " "))
			$(this).val("חפש");
	});

	perm = "";
	for (i = 1; i <= 5; i++)
		perm += '<option value="'+i+'00">'+i+'00</option>';

	$("#PagesPerM").html(perm);
	$(".printers_border").hover(function() {
		$(this).css("background-color", $(this).find("span").html());
	}, function() {
		$(this).css("background-color", "#bababa");
	});

	$(".lb_border").hover(function() {
		$(this).css("background-color", $(this).find("span").html());
	}, function() {
		$(this).css("background-color", "#bababa");
	});

	$(".slide-out-div").tabSlideOut({
		tabHandle: ".facebook",
		pathToTabImage: '<?=WB_URL ?>/images/facebook.png',
		imageHeight: '110px',
		imageWidth: '33px',
		tabLocation: 'right',
		speed: 300,
		action: 'hover',
		topPos: '200px',
		leftPos: '33px',
		fixedPosition: true
	});
	
	
	$(window).load(function () {
		setheight();
	});
	
});

function checkval(){
	val = $("#field40").attr("value");
	if (val[0] == '8' && val.length == 7){
		return true;
	}else{
		window.alert("מספר הלקוח שגוי");
		return false;
	}
}


/*
	* jQuery Cycle Lite Plugin
	* http://malsup.com/jquery/cycle/lite/
	* Copyright (c) 2008-2011 M. Alsup
	* Version: 1.3 (01-JUN-2011)
*/
(function(a){function d(a,b,d){var e=a[0].parentNode,f=e.cycleTimeout;if(f){clearTimeout(f);e.cycleTimeout=0}b.nextSlide=b.currSlide+d;if(b.nextSlide<0){b.nextSlide=a.length-1}else if(b.nextSlide>=a.length){b.nextSlide=0}c(a,b,1,d>=0);return false}function c(b,d,e,f){if(d.busy)return;var g=b[0].parentNode,h=b[d.currSlide],i=b[d.nextSlide];if(g.cycleTimeout===0&&!e)return;if(e||!g.cyclePause){if(d.before.length)a.each(d.before,function(a,b){b.apply(i,[h,i,d,f])});var j=function(){if(a.browser.msie)this.style.removeAttribute("filter");a.each(d.after,function(a,b){b.apply(i,[h,i,d,f])})};if(d.nextSlide!=d.currSlide){d.busy=1;a.fn.cycle.custom(h,i,d,j)}var k=d.nextSlide+1==b.length;d.nextSlide=k?0:d.nextSlide+1;d.currSlide=k?b.length-1:d.nextSlide-1}if(d.timeout)g.cycleTimeout=setTimeout(function(){c(b,d,0,!d.rev)},d.timeout)}var b="Lite-1.3";a.fn.cycle=function(b){return this.each(function(){b=b||{};if(this.cycleTimeout)clearTimeout(this.cycleTimeout);this.cycleTimeout=0;this.cyclePause=0;var e=a(this);var f=b.slideExpr?a(b.slideExpr,this):e.children();var g=f.get();if(g.length<2){window.console&&console.log("terminating; too few slides: "+g.length);return}var h=a.extend({},a.fn.cycle.defaults,b||{},a.metadata?e.metadata():a.meta?e.data():{});var i=a.isFunction(e.data)?e.data(h.metaAttr):null;if(i)h=a.extend(h,i);h.before=h.before?[h.before]:[];h.after=h.after?[h.after]:[];h.after.unshift(function(){h.busy=0});var j=this.className;h.width=parseInt((j.match(/w:(\d+)/)||[])[1])||h.width;h.height=parseInt((j.match(/h:(\d+)/)||[])[1])||h.height;h.timeout=parseInt((j.match(/t:(\d+)/)||[])[1])||h.timeout;if(e.css("position")=="static")e.css("position","relative");if(h.width)e.width(h.width);if(h.height&&h.height!="auto")e.height(h.height);var k=0;f.css({position:"absolute",top:0,left:0}).each(function(b){a(this).css("z-index",g.length-b)});a(g[k]).css("opacity",1).show();if(a.browser.msie)g[k].style.removeAttribute("filter");if(h.fit&&h.width)f.width(h.width);if(h.fit&&h.height&&h.height!="auto")f.height(h.height);if(h.pause)e.hover(function(){this.cyclePause=1},function(){this.cyclePause=0});var l=a.fn.cycle.transitions[h.fx];l&&l(e,f,h);f.each(function(){var b=a(this);this.cycleH=h.fit&&h.height?h.height:b.height();this.cycleW=h.fit&&h.width?h.width:b.width()});if(h.cssFirst)a(f[k]).css(h.cssFirst);if(h.timeout){if(h.speed.constructor==String)h.speed={slow:600,fast:200}[h.speed]||400;if(!h.sync)h.speed=h.speed/2;while(h.timeout-h.speed<250)h.timeout+=h.speed}h.speedIn=h.speed;h.speedOut=h.speed;h.slideCount=g.length;h.currSlide=k;h.nextSlide=1;var m=f[k];if(h.before.length)h.before[0].apply(m,[m,m,h,true]);if(h.after.length>1)h.after[1].apply(m,[m,m,h,true]);if(h.click&&!h.next)h.next=h.click;if(h.next)a(h.next).bind("click",function(){return d(g,h,h.rev?-1:1)});if(h.prev)a(h.prev).bind("click",function(){return d(g,h,h.rev?1:-1)});if(h.timeout)this.cycleTimeout=setTimeout(function(){c(g,h,0,!h.rev)},h.timeout+(h.delay||0))})};a.fn.cycle.custom=function(b,c,d,e){var f=a(b),g=a(c);g.css(d.cssBefore);var h=function(){g.animate(d.animIn,d.speedIn,d.easeIn,e)};f.animate(d.animOut,d.speedOut,d.easeOut,function(){f.css(d.cssAfter);if(!d.sync)h()});if(d.sync)h()};a.fn.cycle.transitions={fade:function(a,b,c){b.not(":eq(0)").hide();c.cssBefore={opacity:0,display:"block"};c.cssAfter={display:"none"};c.animOut={opacity:0};c.animIn={opacity:1}},fadeout:function(b,c,d){d.before.push(function(b,c,d,e){a(b).css("zIndex",d.slideCount+(e===true?1:0));a(c).css("zIndex",d.slideCount+(e===true?0:1))});c.not(":eq(0)").hide();d.cssBefore={opacity:1,display:"block",zIndex:1};d.cssAfter={display:"none",zIndex:0};d.animOut={opacity:0}}};a.fn.cycle.ver=function(){return b};a.fn.cycle.defaults={animIn:{},animOut:{},fx:"fade",after:null,before:null,cssBefore:{},cssAfter:{},delay:0,fit:0,height:"auto",metaAttr:"cycle",next:null,pause:0,prev:null,speed:1e3,slideExpr:null,sync:1,timeout:4e3}})(jQuery);

/*
	* jQuery corner plugin: simple corner rounding
	* Examples and documentation at: http://jquery.malsup.com/corner/
	* version 2.12 (23-MAY-2011)
*/
(function(a){function l(a,b,c){switch(a){case"round":return Math.round(c*(1-Math.cos(Math.asin(b/c))));case"cool":return Math.round(c*(1+Math.cos(Math.asin(b/c))));case"sharp":return c-b;case"bite":return Math.round(c*Math.cos(Math.asin((c-b-1)/c)));case"slide":return Math.round(c*Math.atan2(b,c/b));case"jut":return Math.round(c*Math.atan2(c,c-b-1));case"curl":return Math.round(c*Math.atan(b));case"tear":return Math.round(c*Math.cos(b));case"wicked":return Math.round(c*Math.tan(b));case"long":return Math.round(c*Math.sqrt(b));case"sculpt":return Math.round(c*Math.log(c-b-1,c));case"dogfold":case"dog":return b&1?b+1:c;case"dog2":return b&2?b+1:c;case"dog3":return b&3?b+1:c;case"fray":return b%2*c;case"notch":return c;case"bevelfold":case"bevel":return b+1;case"steep":return b/2+1;case"invsteep":return(c-b)/2+1}}function k(b){while(b){var c=a.css(b,"backgroundColor"),d;if(c&&c!="transparent"&&c!="rgba(0, 0, 0, 0)"){if(c.indexOf("rgb")>=0){d=c.match(/\d+/g);return"#"+j(d[0])+j(d[1])+j(d[2])}return c}if(b.nodeName.toLowerCase()=="html")break;b=b.parentNode}return"#ffffff"}function j(a){a=parseInt(a).toString(16);return a.length<2?"0"+a:a}function i(b,c){return parseInt(a.css(b,c))||0}var b=document.createElement("div").style,c=b["MozBorderRadius"]!==undefined,d=b["WebkitBorderRadius"]!==undefined,e=b["borderRadius"]!==undefined||b["BorderRadius"]!==undefined,f=document.documentMode||0,g=a.browser.msie&&(a.browser.version<8&&!f||f<8),h=a.browser.msie&&function(){var a=document.createElement("div");try{a.style.setExpression("width","0+0");a.style.removeExpression("width")}catch(b){return false}return true}();a.support=a.support||{};a.support.borderRadius=c||d||e;a.fn.corner=function(b){if(this.length==0){if(!a.isReady&&this.selector){var f=this.selector,j=this.context;a(function(){a(f,j).corner(b)})}return this}return this.each(function(f){var j=a(this),m=[j.attr(a.fn.corner.defaults.metaAttr)||"",b||""].join(" ").toLowerCase(),n=/keep/.test(m),o=(m.match(/cc:(#[0-9a-f]+)/)||[])[1],p=(m.match(/sc:(#[0-9a-f]+)/)||[])[1],q=parseInt((m.match(/(\d+)px/)||[])[1])||10,r=/round|bevelfold|bevel|notch|bite|cool|sharp|slide|jut|curl|tear|fray|wicked|sculpt|long|dog3|dog2|dogfold|dog|invsteep|steep/,s=(m.match(r)||["round"])[0],t=/dogfold|bevelfold/.test(m),u={T:0,B:1},v={TL:/top|tl|left/.test(m),TR:/top|tr|right/.test(m),BL:/bottom|bl|left/.test(m),BR:/bottom|br|right/.test(m)},w,x,y,z,A,B,C,D,E,F,G,H,I,J;if(!v.TL&&!v.TR&&!v.BL&&!v.BR)v={TL:1,TR:1,BL:1,BR:1};if(a.fn.corner.defaults.useNative&&s=="round"&&(e||c||d)&&!o&&!p){if(v.TL)j.css(e?"border-top-left-radius":c?"-moz-border-radius-topleft":"-webkit-border-top-left-radius",q+"px");if(v.TR)j.css(e?"border-top-right-radius":c?"-moz-border-radius-topright":"-webkit-border-top-right-radius",q+"px");if(v.BL)j.css(e?"border-bottom-left-radius":c?"-moz-border-radius-bottomleft":"-webkit-border-bottom-left-radius",q+"px");if(v.BR)j.css(e?"border-bottom-right-radius":c?"-moz-border-radius-bottomright":"-webkit-border-bottom-right-radius",q+"px");return}w=document.createElement("div");a(w).css({overflow:"hidden",height:"1px",minHeight:"1px",fontSize:"1px",backgroundColor:p||"transparent",borderStyle:"solid"});x={T:parseInt(a.css(this,"paddingTop"))||0,R:parseInt(a.css(this,"paddingRight"))||0,B:parseInt(a.css(this,"paddingBottom"))||0,L:parseInt(a.css(this,"paddingLeft"))||0};if(typeof this.style.zoom!=undefined)this.style.zoom=1;if(!n)this.style.border="none";w.style.borderColor=o||k(this.parentNode);y=a(this).outerHeight();for(z in u){A=u[z];if(A&&(v.BL||v.BR)||!A&&(v.TL||v.TR)){w.style.borderStyle="none "+(v[z+"R"]?"solid":"none")+" none "+(v[z+"L"]?"solid":"none");B=document.createElement("div");a(B).addClass("jquery-corner");C=B.style;A?this.appendChild(B):this.insertBefore(B,this.firstChild);if(A&&y!="auto"){if(a.css(this,"position")=="static")this.style.position="relative";C.position="absolute";C.bottom=C.left=C.padding=C.margin="0";if(h)C.setExpression("width","this.parentNode.offsetWidth");else C.width="100%"}else if(!A&&a.browser.msie){if(a.css(this,"position")=="static")this.style.position="relative";C.position="absolute";C.top=C.left=C.right=C.padding=C.margin="0";if(h){D=i(this,"borderLeftWidth")+i(this,"borderRightWidth");C.setExpression("width","this.parentNode.offsetWidth - "+D+'+ "px"')}else C.width="100%"}else{C.position="relative";C.margin=!A?"-"+x.T+"px -"+x.R+"px "+(x.T-q)+"px -"+x.L+"px":x.B-q+"px -"+x.R+"px -"+x.B+"px -"+x.L+"px"}for(E=0;E<q;E++){F=Math.max(0,l(s,E,q));G=w.cloneNode(false);G.style.borderWidth="0 "+(v[z+"R"]?F:0)+"px 0 "+(v[z+"L"]?F:0)+"px";A?B.appendChild(G):B.insertBefore(G,B.firstChild)}if(t&&a.support.boxModel){if(A&&g)continue;for(H in v){if(!v[H])continue;if(A&&(H=="TL"||H=="TR"))continue;if(!A&&(H=="BL"||H=="BR"))continue;I={position:"absolute",border:"none",margin:0,padding:0,overflow:"hidden",backgroundColor:w.style.borderColor};J=a("<div/>").css(I).css({width:q+"px",height:"1px"});switch(H){case"TL":J.css({bottom:0,left:0});break;case"TR":J.css({bottom:0,right:0});break;case"BL":J.css({top:0,left:0});break;case"BR":J.css({top:0,right:0});break}B.appendChild(J[0]);var K=a("<div/>").css(I).css({top:0,bottom:0,width:"1px",height:q+"px"});switch(H){case"TL":K.css({left:q});break;case"TR":K.css({right:q});break;case"BL":K.css({left:q});break;case"BR":K.css({right:q});break}B.appendChild(K[0])}}}}})};a.fn.uncorner=function(){if(e||c||d)this.css(e?"border-radius":c?"-moz-border-radius":"-webkit-border-radius",0);a("div.jquery-corner",this).remove();return this};a.fn.corner.defaults={useNative:true,metaAttr:"data-corner"}})(jQuery);

/*
	tabSlideOUt v1.3
	By William Paoli: http://wpaoli.building58.com
*/
(function(a){a.fn.tabSlideOut=function(b){var c=a.extend({tabHandle:".handle",speed:300,action:"click",tabLocation:"left",topPos:"200px",leftPos:"20px",fixedPosition:false,positioning:"absolute",pathToTabImage:null,imageHeight:null,imageWidth:null,onLoadSlideOut:false},b||{});c.tabHandle=a(c.tabHandle);var d=this;if(c.fixedPosition===true)c.positioning="fixed";else c.positioning="absolute";if(document.all&&!window.opera&&!window.XMLHttpRequest)c.positioning="absolute";if(c.pathToTabImage!=null){c.tabHandle.css({background:"url("+c.pathToTabImage+") no-repeat",width:c.imageWidth,height:c.imageHeight})}c.tabHandle.css({display:"block",textIndent:"-99999px",outline:"none",position:"absolute"});d.css({"line-height":"1",position:c.positioning});var e={containerWidth:parseInt(d.outerWidth(),10)+"px",containerHeight:parseInt(d.outerHeight(),10)+"px",tabWidth:parseInt(c.tabHandle.outerWidth(),10)+"px",tabHeight:parseInt(c.tabHandle.outerHeight(),10)+"px"};if(c.tabLocation==="top"||c.tabLocation==="bottom"){d.css({left:c.leftPos});c.tabHandle.css({right:0})}if(c.tabLocation==="top"){d.css({top:"-"+e.containerHeight});c.tabHandle.css({bottom:"-"+e.tabHeight})}if(c.tabLocation==="bottom"){d.css({bottom:"-"+e.containerHeight,position:"fixed"});c.tabHandle.css({top:"-"+e.tabHeight})}if(c.tabLocation==="left"||c.tabLocation==="right"){d.css({height:e.containerHeight,top:c.topPos});c.tabHandle.css({top:0})}if(c.tabLocation==="left"){d.css({left:"-"+e.containerWidth});c.tabHandle.css({right:"-"+e.tabWidth})}if(c.tabLocation==="right"){d.css({right:"-"+e.containerWidth});c.tabHandle.css({left:"-"+e.tabWidth});a("html").css("overflow-x","hidden")}c.tabHandle.click(function(a){a.preventDefault()});var f=function(){d.stop();if(c.tabLocation==="top")d.animate({top:"-"+e.containerHeight},c.speed).removeClass("open");else if(c.tabLocation==="left")d.animate({left:"-"+e.containerWidth},c.speed).removeClass("open");else if(c.tabLocation==="right")d.animate({right:"-"+e.containerWidth},c.speed).removeClass("open");else if(c.tabLocation==="bottom")d.animate({bottom:"-"+e.containerHeight},c.speed).removeClass("open")};var g=function(){d.stop();if(c.tabLocation=="top")d.animate({top:"-3px"},c.speed).addClass("open");else if(c.tabLocation=="left")d.animate({left:"-3px"},c.speed).addClass("open");else if(c.tabLocation=="right")d.animate({right:"-3px"},c.speed).addClass("open");else if(c.tabLocation=="bottom")d.animate({bottom:"-3px"},c.speed).addClass("open")};var h=function(){d.click(function(a){a.stopPropagation()});a(document).click(function(){f()})};var i=function(){c.tabHandle.click(function(a){if(d.hasClass("open"))f();else g()});h()};var j=function(){d.hover(function(){g()},function(){f()});c.tabHandle.click(function(a){if(d.hasClass("open")){f()}});h()};var k=function(){f();setTimeout(g,500)};if(c.action==="click")i();if(c.action==="hover")j();if(c.onLoadSlideOut)k()}})(jQuery)
