// function displaySearchDiv(ev) { //alert("In display search div"); if (typeof isSearchBoxVisible !== 'undefined'&& isSearchBoxVisible) { window["clickHandlerForLoginDIV"](ev); window["clickHandler"](ev); return; } var SEARCHBOXDIV = document.getElementById('divbanner-content-center-RIGHT'); var FBLikeDiv = document.getElementById('FBLikeDIV'); SEARCHBOXDIV.style.position = 'fixed'; SEARCHBOXDIV.style.top = '40px'; SEARCHBOXDIV.style.padding = '6px 20px 1px 2px'; SEARCHBOXDIV.style.zIndex = '99'; SEARCHBOXDIV.style.height = '47px'; FBLikeDiv.style.display = 'none'; var isIE = document.all ? true : false; //document.onmousemove = getMousePosition; //function getMousePosition(ev) { var _x; var _y; if (!isIE) { _x = ev.pageX; _y = ev.pageY; } if (isIE) { _x = ev.clientX + document.body.scrollLeft; _y = ev.clientY + document.body.scrollTop; } posX = _x; posY = _y; SEARCHBOXDIV.style.top = '40px'; SEARCHBOXDIV.style.left = (posX-270) + 'px'; isSearchBoxVisible = true; // now use jquery to register blur event $(".divbanner-content-center-RIGHT").on('blur',function(){ alert("In blur in web headers!"); }); $('body').bind( "click", clickHandler ); //alert("In finish binding!"); ev.stopPropagation(); } function moveDailyDeals(where) { var allVals = $('[aria-expanded="true"]'); //alert("Found:" + allVals[0] + ": All vals length:"+allVals.length);// var indexOfSymbol = String(allVals[0]).indexOf("#"); var categoryName = String(allVals[0]).substring(indexOfSymbol+1); //alert("Found:" + categoryName + ": All vals length:"+allVals.length);// //($(this).find('a[aria-expanded]').attr('aria-expanded'))); var x = document.getElementsByClassName("bk-one-tab-content"+categoryName); var howMany = x.length; var i; for (i = 0; i < howMany; i++) { if (x[i].style.display != "none") break; } var nextIndex = i + where; if (nextIndex < 0) nextIndex += howMany; else if (nextIndex >= howMany) nextIndex -= howMany; //alert("nextIndex now:"+nextIndex); //x[i].style.transition = "display 1.2s linear 0s"; x[i].style.display = "none"; //x[i].style.animation = "none"; //x[nextIndex].style.transition = "display 0.2s linear 0s"; x[nextIndex].style.display = "block"; x[nextIndex].style.animation = "fadeIn 1.2s"; //x[nextIndex].style.animation = "none"; x[nextIndex].style.setProperty("-webkit-animation", "fadeIn 1.2s"); } function validateSearchForm() { var searchText = document.getElementById("search").value; //alert("Search text:"+searchText); searchText = searchText.trim(); if (searchText.length < 2) { alert("Please input at least twocharacters to have ameaningful search string."); return false; } } function pickButtonIdBasedOnSort(buttonID) { if (buttonID == 'DATE_TIME') { return 'dateTimeSortButton'; } else if (buttonID == 'CATEGORY') { return 'categorySortButton'; } else if (buttonID == 'POPULARITY') { return 'popularitySortButton'; } else if (buttonID == 'PRICE') { return 'priceSortButton'; } else return "NOTHING_FOUND_NO_BITTON!"; } function postComment(e, dealID, pathToRoot) { //alert("In postComment, dealIS:" + dealID + ":, path:" + pathToRoot); if (!e) var e = window.event; e.cancelBubble = true; if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } window.location.href = pathToRoot + "code/DisplayDeal.php?id=" + dealID + "&action=postNewComment" + "#newCommentDisplayArea"; }