Fixed the following:
- Corrected spell errors
- Replaced live calls with delegate
Removed unused variable declarations
Use jquery find for more efficient selectors as a safe change before a more drastic caching aproach
Cache selectors to avoid hitting the dom so many times
Remove over qualification from searchGadget, it doesn't need an input since it's an id so there should be only one of them in the page
Cached searchGadget and form.searchPage
pt_toggle was checked on input not select and added select to the delegate filter
Removed pt_toggle check since the logic for query pulling needs to work even when you select all or none, if you add a breakpoint to the old code you will see that it will enter in the live function callback even thou if you run the selector pt_toggle will not be returned
Filter the input from the cached search-filter selector and do not check of input type, but check if there is more than one result since by default you always have one checked date radio input button
fixed merged issues
Optimize ajax-search-res calls by caching results
Fixed  assigment in case search-term doesn't exist
Removed jquery wrapper from selector that is passed to appendTo
Removed addition of ajax-search-res to dom since you can create a div with jquery without adding it to the dom and then assign to it with html the result of the ajax load thus avoiding dom manipulation for hidden data
Added changes.txt entry defining the scope of this pull request fixes
Use object.hasOwnProperty instead of same method from window.history to workaround lack of support from < IE9
Check if history has support for hasOwnProperty and feed fallback only to those who don't have support
Aparrently Chrome doesn't like hasOwnProperty being called while cached from a variable
Fixed merge issues with changes from master
Go back to the original check for state of window.history:
- Although my check is more purist and it avoids jslint warning, the original
check still works even in IE7 and it just less logic to deal and check