@extends('layouts.app')

@section('title')

Journal Search

@parent

@stop

{{-- page level styles --}}

@section('header_styles')

<!--page level css -->

<link href="{{ asset('assets/vendors/select2/css/select2.min.css') }}" type="text/css" rel="stylesheet">
<link href="{{ asset('assets/vendors/select2/css/select2-bootstrap.css') }}" rel="stylesheet">

<link rel="stylesheet" href="{{ asset('assets/vendors/bootstrap-tagsinput/css/bootstrap-tagsinput.css') }}" />
<link rel="stylesheet" href="{{ asset('assets/vendors/bootstrap-tagsinput/css/app.css') }}" />

<!-- range slider -->
<link rel="stylesheet" href="https://refreshless.com/nouislider/dist/nouislider.css">
<script src="https://refreshless.com/nouislider/dist/nouislider.js"></script>
<!-- range slider -->

<!--end of page level css-->

@stop

{{-- Page content --}}

@section('content')

<style>
	.fs-16 {
		font-size: 16px;
	}

	.fs-18 {
		font-size: 18px;
	}

	.j-info-title {
		color: #064f86;
		font-weight: 500;
		font-size: 14px;
	}

	.border-right-not-last:not(:last-child) {
		border-right: 1px solid #dedede;
	}

	.journalNameBtn {
		color: #064f86;
		font-size: 22px;
		font-weight: 600;
	}

	.submit-paper-btn {
		border: 1px solid #064f86;
		/* padding: 8px 20px; */
		background-color: #064f86;
		color: #fff;
		transition: .3s all ease-in-out;
	}

	.noUi-connect {
		background: #064f86 !important;
		cursor: grab;
	}

	.noUi-horizontal {
		height: 8px !important;
	}

	.noUi-horizontal .noUi-handle {
		width: 14px !important;
		height: 14px !important;
		right: -10px !important;
		top: -4px !important;
		border-radius: 50%;
		cursor: grab;
	}

	.noUi-horizontal .noUi-handle::after,
	.noUi-horizontal .noUi-handle::before {
		display: none !important;
	}

	.loader-container {
		background: rgba(0, 0, 0, 0.7);
		z-index: 9999;
		display: flex;
		position: fixed;
		inset: 0;
		width: 100%;
		height: 100%;
		justify-content: center;
		align-items: center;
	}

	.loader {
		border: 16px solid #f3f3f3;
		border-radius: 50%;
		border-top: 16px solid #3498db;
		width: 120px;
		height: 120px;
		-webkit-animation: spin 2s linear infinite;
		/* Safari */
		animation: spin 2s linear infinite;
	}

	.d-none {
		display: none;
	}

	.card-columns {
		-webkit-column-count: 2;
		-moz-column-count: 2;
		column-count: 2;
	}

	/* Safari */
	@-webkit-keyframes spin {
		0% {
			-webkit-transform: rotate(0deg);
		}

		100% {
			-webkit-transform: rotate(360deg);
		}
	}

	@keyframes spin {
		0% {
			transform: rotate(0deg);
		}

		100% {
			transform: rotate(360deg);
		}
	}

	.bootstrap-tagsinput {
		height: 5vh;
	}

	.bootstrap-tagsinput .tag {
		color: white;
		background-color: #67C5DF;
		padding: 0.2em 0.6em 0.3em;
		font-size: 75%;
		font-weight: 700;
		border-radius: 0.25em;
	}
	
	/* Custom CSS for multiline tooltip */
	.tooltip-inner {
		max-width: 300px;
		text-align: left !important;
		white-space: normal !important;
	}
</style>

<section class="pt-4" id="listing-search">
	<div class="container">
		<div class="row">
			<div class="col-md-12 text-white">
				<h1 class="h3">
					Search
				</h1>
				<hr>
			</div>
		</div>
		<div class="row">
			<div class="col-12">
				<div class="card bigbox-hvr-slow">
					<div class="card-body">
						<form action="{{ route('journalfinder') }}" enctype="multipart/form-data" method="post">
							<input type="hidden" name="_token" value="{{ csrf_token() }}">
							<div class="row align-items-center col-md-10 mx-auto">
								<h5 class="col-12 col-md-3 col-lg-2 text-dark text-left border-right pt-4 h-100 m-0">
									Find Journals
								</h5>

								<div class="col-md-9 col-lg-10 pr-0">
									<label class="mr-3">
										<input type="radio" name="searchOption" value="keywords" {{ $searchOption == 'keywords' ? 'checked' : ''}}> Search by keywords
									</label>
									<label>
										<input type="radio" name="searchOption" value="abstract" {{ $searchOption == 'abstract' ? 'checked' : ''}}> Search by abstract
									</label>

									<div class="input-group input-group-lg pull-right">
										<div id="searchvalueDiv" class="col-md-10 p-0">
											<input class="form-control" name="searchvalue" autocomplete="off" autocorrect="off" type="text" @if($searchOption=="keywords" ) value="{{$journalSearch}}" @endif>
											<div class="col-md-12 alert alert-info mx-auto mt-2">
												<strong>Note: </strong>
												Use quotation marks (" ") to find an exact phrase (e.g. "baryon decay").
											</div>
										</div>

										<div id="abstractDiv" class="col-md-10 p-0" style="display: none;">
											<textarea class="form-control" name="abstract" placeholder="Enter abstract..." rows="2" minlength="10" maxlength="1700">@if($searchOption == "abstract") {{$journalSearch}} @endif</textarea>
											<p>Maximum 400 words</p>
										</div>
										<div class="input-group-prepend col-md-2 h-25 p-0">
											<button id="normal_search_btn" class="btn btn-info btn-block" value="basic_search" name="btnjournalsearch" type="submit">Search</button>
										</div>
									</div>
								</div>
						</form>
					</div>
				</div>
			</div>

			@if($searchOption == "abstract" && !empty($data_arr))
			<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModalLong">Search Words</button>
			<div class="modal fade" id="exampleModalLong" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
				<div class="modal-dialog modal-lg" role="document">
					<div class="modal-content">
						<div class="modal-header">
							<h5 class="modal-title" id="exampleModalLongTitle">Search Words Lists</h5>
							<button type="button" class="close" data-dismiss="modal" aria-label="Close">
								<span aria-hidden="true">&times;</span>
							</button>
						</div>
						<div class="modal-body">
							<p>{{$occurences}}</p>
						</div>
						<div class="modal-footer border-0">
							<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
						</div>
					</div>
				</div>
			</div>
			@endif

		</div>
	</div>
</section>

<main>
	<section>

		<div class="container">
			@if(!empty($data_arr))
			<div class="row">
				<div class="col-12 col-md-3 mb-3">
					<div class="leftBar bg-white py-4 px-3 rounded">
						<div class="mb-3">
							<p class="mb-0 fs-16 fw-bold">Impact factor <a data-toggle="tooltip" data-placement="top" class="btn btn-link p-0" title="Journal Impact Factor is a measure of the number of times an average paper in a particular journal is cited during the preceding 2 years. Copyright Clarivate Analytics."><i class="fa-solid fa-circle-info ml-2"></i></a></p>
							<p class="fs-16 mb-3">All journals</p>
							<div id="impactfactor_range"></div>
							<div class="mt-1 d-flex justify-content-between">
								<h6 class="text-secondary" id="impactfactor_min"></h6>
								<h6 class="text-secondary" id="impactfactor_max"></h6>
							</div>
						</div>
						<div class="mb-3">
							<p class="mb-0 fs-16 fw-bold">CiteScore <a data-toggle="tooltip" data-placement="top" class="btn btn-link p-0" title="CiteScore measures the average citations received per peer-reviewed document published in this title. CiteScore values are based on citation counts in a range of four years (e.g. 2016–2019) to peer-reviewed documents (articles, reviews, conference papers, data papers and book chapters) published in the same four calendar years, divided by the number of these documents in these same four years (e.g. 2016–2019)."><i class="fa-solid fa-circle-info ml-2"></i></a></p>
							<p class="fs-16 mb-3">All journals</p>
							<div id="citescore_range"></div>
							<div class="mt-1 d-flex justify-content-between">
								<h6 class="text-secondary" id="citescore_min"></h6>
								<h6 class="text-secondary" id="citescore_max"></h6>
							</div>
						</div>
					</div>
				</div>
				<div class="col-12 col-md-9 mb-3" id="search_data">

					@php
					$cnt = 0;
					@endphp
					@foreach($data_arr as $journal_details)
					@if($journal_details['journal_status'] == 1)
					@php
					$cnt++;
					@endphp
					<div class="card card-body shadow mb-3 text-center text-md-left">
						<div class="row justify-content-between align-items-center mb-1">
							<div class="col-md-6">
								<a href="https://www.eurekaselect.com/journal/{{$journal_details['journal_id']}}" class="journalNameBtn" target="_blank">{{$journal_details['journal_title']}}</a>
							</div>
							<div class="col-md-6 text-md-right text-center mt-1">
							@if($journal_details['journal_code'] !="CN" && $journal_details['journal_code'] !="CPA")
								<a href="https://bentham.manuscriptpoint.com/journals/{{$journal_details['jms_jcode']}}?utm_source=eurekaselect&utm_medium=website&utm_campaign=journalfinder&utm_term=unpaid&utm_content=link" class="submit-paper-btn btn btn-sm btn-primary bg-siteblue" target="_blank">Submit Paper <i class="fa-solid fa-chevron-right"></i></a>
							@endif

								<a href="https://www.eurekaselect.com/journal/{{$journal_details['journal_id']}}" class="submit-paper-btn btn btn-sm btn-primary bg-siteblue" target="_blank">Journal Home </a>
							</div>
						</div>
						<div class="row border-top pt-2 mb-2">
							<div class="col-md-6">
								<p class="mb-2 font-16">ISSN (Print): {{$journal_details['issn']}} | ISSN (Online): {{$journal_details['eissn']}}</p>
							</div>
							<!-- <div class="col-md-6 text-md-right">
								<span style="background-color:orange;" class="px-2 py-0 d-inline-block mt-1 ml-3 rounded font-16 fw-bold mx-auto"><b>Search Score : {{$journal_details['score']}}</b></span>
							</div> -->
						</div>



						<div class="row">
							<div class="col-md-2 text-md-left text-center">
								<img src="https://www.eurekaselect.com/images/bentham/{{$journal_details['image_file_name']}}" alt="journal" class="img-fluid mb-3">
							</div>
							<div class="col-md-10">
								<div class="row mb-4">
									<div class="border-right-not-last col">
										<p class="mb-1 j-info-title">Impact Factor</p>
										<h5 class="mb-0">{{$journal_details['journal_impact_factor']}}</h5>
									</div>
									<div class="border-right-not-last col">
										<p class="mb-1 j-info-title">CiteScore</p>
										<h5 class="mb-0">{{$journal_details['journal_cite_score']}}</h5>
									</div>
									<div class="border-right-not-last col">
										<p class="mb-1 j-info-title">Acceptance rate</p>
										@if(!empty($journal_acceptance_rates_list))
										@foreach($journal_acceptance_rates_list as $journal_acceptance_rate)
										@if($journal_details['jms_jcode'] == $journal_acceptance_rate->journal_code)
										<h5 class="mb-0">{{ceil($journal_acceptance_rate->acceptance_rate) . "%"}}</h5>
										@endif
										@endforeach
										@endif
									</div>
								</div>
								<div class="row d-block">
									<div class="col-12 mb-2">
										<h4 class="mb-0 border-bottom pb-2">Publishing options for this journal</h4>
									</div>
									@if(!empty($journal_details['APC_charges']))
									<div class="col-12 col-md-6 mb-2 mb-md-0 float-left">
										<a class="mb-0 bg-primary text-white py-1 px-2 d-inline-block mb-2 font-14" data-toggle="collapse" href="#{{$journal_details['journal_title']}}" role="button" aria-expanded="false" aria-controls="{{$journal_details['journal_title']}}">Article Processing Charges <i class="fa-solid fa-chevron-right"></i></a>
										<div class="collapse" id="{{$journal_details['journal_title']}}">
											<h4>{{$journal_details['APC_charges']}}</h4>
											<p class="text-small mb-0">Article Processing Charges (APC), excluding taxes</p>
										</div>
									</div>
									@endif

									<div class="accordion col-12 col-md-6 mb-2 mb-md-0 float-right pt-4" id="accordionExample">
										<div class="d-flex justify-content-end align-items-end h-100">
											<button class="btn btn-outline-dark btn-sm" type="button" data-toggle="collapse" data-target="#{{$journal_details['journal_id']}}" aria-expanded="true" aria-controls="{{$journal_details['journal_id']}}">
												More Details...
											</button>
										</div>
									</div>
								</div>
							</div>
							<div id="{{$journal_details['journal_id']}}" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
								<div class="card-body text-justify">
									<div class="row mb-3">
										<div class="col-md-2 fw-bold fs-18">Subject area</div>
										<div class="col-md-10 text-justify">
											{{$journal_details['journal_subject']}}
										</div>
									</div>
									<div class="row mb-3">
										<div class="col-md-2 fw-bold fs-18">
											Recent articles
										</div>
										<div class="col-md-10">
											<div class="row">
												@if(!empty($journal_details['article']))
												@foreach($journal_details['article'] as $article_lists)
												<div class="col-12 col-md-4">
													<a href="https://www.eurekaselect.com/article/{{$article_lists['article_id']}}" class="text-siteblue text-justify" target="_blank">{{$article_lists['title']}}</a>
												</div>
												@endforeach
												@endif
											</div>
										</div>
									</div>
									<div class="row mb-3">
										<div class="col-md-2 fw-bold fs-18">Journal scope</div>
										<div class="col-md-10">
											{!!$journal_details['aims_and_scope']!!}
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
					@endif
					@endforeach

					@if($cnt > 0)
					@include('pagination')
					@endif
				</div>

				<div class="col-12 col-md-9 mb-3" id="filter_data" style="display: none;">
					<!-- Filter result to be displayed here -->
				</div>

				<div class="alert alert-danger col-12 col-md-9 align-self-start" id="no_record" style="display: none;">
					<p>No Record</p>
				</div>
			</div>
			@else
			@if(!empty($journal_list))
			@foreach($journal_list as $journal_details)
			<div class="card card-body shadow mb-3">
				<div class="row border-bottom pb-2 mb-3">
					<div class="col-md-8">
						<a href="https://www.eurekaselect.com/journal/{{$journal_details['journal_id']}}" class="journalNameBtn" target="_blank">{{$journal_details['journal_title']}}</a>
						<span class="badge-info px-2 py-1 mt-1 ml-3 rounded font-14 fw-bold mx-auto d-inline-block">ISSN (Print): {{$journal_details['issn']}}</span>
						<span class="badge-info px-2 py-1 mt-1 ml-3 rounded font-14 fw-bold mx-auto d-inline-block">ISSN (Online): {{$journal_details['eissn']}}</span>
					</div>
					<div class="col-md-4 text-md-right text-left py-2 py-md-0">
					@if($journal_details['jms_code'] !="CN" && $journal_details['jms_code'] !="CPA")
						<a href="https://bentham.manuscriptpoint.com/journals/{{$journal_details['jms_code']}}?utm_source=eurekaselect&utm_medium=website&utm_campaign=journalfinder&utm_term=unpaid&utm_content=link" class="submit-paper-btn btn btn-sm btn-primary bg-siteblue" target="_blank">Submit paper <i class="fa-solid fa-chevron-right"></i></a>
					@endif

						<a href="https://www.eurekaselect.com/journal/{{$journal_details['journal_id']}}" class="btn btn-sm btn-primary bg-siteblue">Journal Home</a>
					</div>
				</div>

				<div class="row">
					<div class="col-md-2 text-md-left text-center">
						<img src="https://www.eurekaselect.com/images/bentham/{{$journal_details['image_file_name']}}" alt="journal" class="img-fluid mb-3">
					</div>
					<div class="col-md-10">
						<div class="row mb-4">
							<div class="border-right-not-last col">
								<p class="mb-1 j-info-title">Impact Factor</p>
								<h5 class="mb-0">&nbsp;{{$journal_details['journal_impact_factor']}}</h5>
							</div>
							<div class="border-right-not-last col">
								<p class="mb-1 j-info-title">CiteScore</p>
								<h5 class="mb-0">&nbsp;{{$journal_details['ScopusCiteScore']}}</h5>
							</div>
							<div class="border-right-not-last col">
								<p class="mb-1 j-info-title">Acceptance rate</p>
								@if(!empty($journal_acceptance_rates_list))
								@foreach($journal_acceptance_rates_list as $journal_acceptance_rate)
								@if($journal_details['jms_code'] == $journal_acceptance_rate->journal_code)
								<h5 class="mb-0">&nbsp;{{ceil($journal_acceptance_rate->acceptance_rate) . "%"}}</h5>
								@endif
								@endforeach
								@else
								<h5 class="mb-0">&nbsp;</h5>
								@endif
							</div>
						</div>
						<div class="row">
							<div class="col-12 mb-2">
								<h4 class="mb-0 border-bottom pb-2">Publishing options for this journal</h4>
							</div>
							@if(!empty($journal_details['APC_charges']))
							<div class="col-12 col-md-6 mb-2 mb-md-0 float-left">
								<a class="mb-0 bg-primary text-white py-1 px-2 d-inline-block mb-2 font-14" data-toggle="collapse" href="#{{$journal_details['journal_title']}}" role="button" aria-expanded="false" aria-controls="{{$journal_details['journal_title']}}">Article Processing Charges <i class="fa-solid fa-chevron-right"></i></a>
								<div class="collapse" id="{{$journal_details['journal_title']}}">
									<h4>{{$journal_details['APC_charges']}}</h4>
									<p class="text-small mb-0">Article Processing Charges (APC), excluding taxes</p>
								</div>
							</div>
							@endif
						</div>
					</div>
				</div>
				<div class="accordion col-12 mb-2 mb-md-0" id="accordionExample">
					<div class="d-flex justify-content-end align-items-end h-100">
						<button class="btn btn-outline-dark btn-sm" type="button" data-toggle="collapse" data-target="#{{$journal_details['journal_id']}}" aria-expanded="true" aria-controls="{{$journal_details['journal_id']}}">
							More Details...
						</button>
					</div>
				</div>
				<div id="{{$journal_details['journal_id']}}" class="collapse" aria-labelledby="headingOne" data-parent="#accordionExample">
					<div class="card-body pb-0">
						<div class="row mb-3">
							<div class="col-md-2 fw-bold fs-18">Subject area</div>
							<div class="col-md-10 text-justify">
								{{$journal_details['journal_subject']}}
							</div>
						</div>
						<div class="row mb-3">
							<div class="col-md-2 fw-bold fs-18">
								Recent articles
							</div>
							<div class="col-md-10">
								<div class="row">
									@if(!empty($journal_details['article']))
									@foreach($journal_details['article'] as $article_lists)
									<div class="col-12 col-md-4">
										<a href="https://www.eurekaselect.com/article/{{$article_lists['article_id']}}" class="text-siteblue text-justify" target="_blank">{{$article_lists['article_title']}}</a>
									</div>
									@endforeach
									@endif
								</div>
							</div>
						</div>
						<div class="row mb-3">
							<div class="col-md-2 fw-bold fs-18">Journal scope</div>
							<div class="col-md-10">
								{!!$journal_details['aims_and_scope']!!}
							</div>
						</div>
					</div>
				</div>
			</div>
			@endforeach
			@else
			<div class="alert alert-danger col-12 mb-3">
				<p>No Record Found</p>
			</div>
			@endif
			@endif
		</div>
		<div class="loader-container" id="loader" style="display: none;">
			<div class="loader">
			</div>
		</div>

	</section>
</main>

@endsection

{{-- page level scripts --}}

@section('footer_scripts')
<script src="{{ asset('assets/vendors/bootstrap-tagsinput/js/bootstrap-tagsinput.js') }}" type="text/javascript"></script>
<script>
	document.addEventListener('DOMContentLoaded', function() {
		let radioButtons = document.querySelectorAll('input[name="searchOption"]');
		let searchvalueDiv = document.getElementById('searchvalueDiv');
		let abstractDiv = document.getElementById('abstractDiv');

		function toggleDivVisibility(selectedValue) {
			if (selectedValue === 'keywords') {
				searchvalueDiv.style.display = 'block';
				abstractDiv.style.display = 'none';

				// Required condition for keywords
				searchvalueDiv.querySelector('input').setAttribute('required', 'required');
				abstractDiv.querySelector('textarea').removeAttribute('required');
			} else if (selectedValue === 'abstract') {
				searchvalueDiv.style.display = 'none';
				abstractDiv.style.display = 'block';

				// Required condition for abstract
				abstractDiv.querySelector('textarea').setAttribute('required', 'required');
				searchvalueDiv.querySelector('input').removeAttribute('required');
			}
		}

		radioButtons.forEach(function(radioButton) {
			radioButton.addEventListener('change', function(event) {
				toggleDivVisibility(event.target.value);
			});
		});

		// Set initial visibility based on the selected radio button
		toggleDivVisibility("{{ $searchOption }}");
	});
</script>
<script>
	let userSearch = `<?php echo $journalSearch ?>`;
	let searchOption = `<?php echo $searchOption ?>`;


	// citescore
	let slider = document.getElementById('citescore_range');
	let minValue = document.getElementById('citescore_min');
	let maxValue = document.getElementById('citescore_max');

	noUiSlider.create(slider, {
		start: [0, 10],
		connect: true,
		step: 1,
		range: {
			'min': 0,
			'max': 10
		}
	});
	// citescore

	// impactfactor
	let impactfactor_slider = document.getElementById('impactfactor_range');
	let impactfactor_minValue = document.getElementById('impactfactor_min');
	let impactfactor_maxValue = document.getElementById('impactfactor_max');


	noUiSlider.create(impactfactor_slider, {
		start: [0, 10],
		connect: true,
		step: 1,
		range: {
			'min': 0,
			'max': 10
		}
	});
	// impactfactor

	let impactFactMinval = 0;
	let impactFactMaxVal = 10;
	let citescoreMinval = 0;
	let citescoreMaxVal = 10;

	// citescore
	slider.noUiSlider.on('update', function(values) {

		minValue.textContent = Math.round(values[0]);
		maxValue.textContent = Math.round(values[1]);

		citescoreMinval = Math.round(values[0]);
		citescoreMaxVal = Math.round(values[1]);
		if (citescoreMinval != 0 || citescoreMaxVal != 10) {
			setTimeout(function() {
				updateFilter();
			}, 2000);
		}
	});
	// citescore

	// impactfactor
	impactfactor_slider.noUiSlider.on('update', function(values) {
		impactfactor_minValue.textContent = Math.round(values[0]);
		impactfactor_maxValue.textContent = Math.round(values[1]);

		impactFactMinval = Math.round(values[0]);
		impactFactMaxVal = Math.round(values[1]);
		if (impactFactMinval != 0 || impactFactMaxVal != 10) {
			setTimeout(function() {
				updateFilter();
			}, 2000);
		}
	});
	// impactfactor

	const updateFilter = () => {

		let href = '';

		if ((citescoreMinval != 0 || citescoreMaxVal != 10) && (impactFactMinval != 0 || impactFactMaxVal != 10)) {

			if (searchOption == "keywords") {
				href = `https://www.eurekaselect.com/journalfinder?searchvalue=${userSearch}&citescoreMinval=${citescoreMinval}&citescoreMaxVal=${citescoreMaxVal}&impactFactMinval=${impactFactMinval}&impactFactMaxVal=${impactFactMaxVal}&searchOption=${searchOption}`;
			} else if (searchOption == "abstract") {
				href = `https://www.eurekaselect.com/journalfinder?abstract=${userSearch}&citescoreMinval=${citescoreMinval}&citescoreMaxVal=${citescoreMaxVal}&impactFactMinval=${impactFactMinval}&impactFactMaxVal=${impactFactMaxVal}&searchOption=${searchOption}`;
			}

			//console.log(href);

		} else if (citescoreMinval != 0 || citescoreMaxVal != 10) {
			if (searchOption == "keywords") {
				href = `https://www.eurekaselect.com/journalfinder?searchvalue=${userSearch}&citescoreMinval=${citescoreMinval}&citescoreMaxVal=${citescoreMaxVal}&searchOption=${searchOption}`;
			} else if (searchOption == "abstract") {
				href = `https://www.eurekaselect.com/journalfinder?abstract=${userSearch}&citescoreMinval=${citescoreMinval}&citescoreMaxVal=${citescoreMaxVal}&searchOption=${searchOption}`;
			}

			//console.log("Hello",href);

		} else if (impactFactMinval != 0 || impactFactMaxVal != 10) {
			if (searchOption == "keywords") {
				href = `https://www.eurekaselect.com/journalfinder?searchvalue=${userSearch}&impactFactMinval=${impactFactMinval}&impactFactMaxVal=${impactFactMaxVal}&searchOption=${searchOption}`;
			} else if (searchOption == "abstract") {
				href = `https://www.eurekaselect.com/journalfinder?abstract=${userSearch}&impactFactMinval=${impactFactMinval}&impactFactMaxVal=${impactFactMaxVal}&searchOption=${searchOption}`;
			}

		}

		$.ajax({
			url: href,
			beforeSend: function() {
				$("#loader").show();
			},
			success: function(data) {
				$("#search_data").hide();
				$("#loader").hide();
				if (data.trim() === "") {
					$("#filter_data").html(data).hide();
					$("#no_record").show();
				} else {
					$("#no_record").hide();
					$("#filter_data").html(data).show();
					//console.log(data);
				}
			}
		});
	}
</script>
<script>
	$(function() {
		$('[data-toggle="tooltip"]').tooltip()
	})
</script>

@stop