(function() {
// Localize jQuery variable
var jQuery;
/******** Load jQuery if not present *********/
if (window.jQuery === undefined) {
var script_tag = document.createElement('script');
script_tag.setAttribute("type","text/javascript");
script_tag.setAttribute("src","https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js");
var script_slick = document.createElement('script');
script_slick.setAttribute("type","text/javascript");
script_slick.setAttribute("src","https://www.deskjock.reviews/assets/js/plugins/slick/slick.min.js");
if (script_tag.readyState) {
script_tag.onreadystatechange = function () { // For old versions of IE
if (this.readyState == 'complete' || this.readyState == 'loaded') {
carousel_scriptLoadHandler();
}
};
} else {
script_tag.onload = carousel_scriptLoadHandler;
}
// Try to find the head, otherwise default to the documentElement
(document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_tag);
(document.getElementsByTagName("head")[0] || document.documentElement).appendChild(script_slick);
} else {
// The jQuery version on the window is the one we want to use
jQuery = window.jQuery;
carousel_main();
}
/******** Called once jQuery has loaded ******/
function carousel_scriptLoadHandler() {
// Restore $ and window.jQuery to their previous values and store the
// new jQuery in our local jQuery variable
jQuery = window.jQuery.noConflict(true);
// Call our main function
carousel_main();
}
/******** Our main function ********/
function carousel_main() {
jQuery(document).ready(function($) {
/******* Load CSS *******/
var css_link_ca = $("", {
rel: "stylesheet",
type: "text/css",
href: "https://www.deskjock.reviews/assets/js/plugins/slick/slick.css"
});
css_link_ca.appendTo('head');
var css_link_ca2 = $("", {
rel: "stylesheet",
type: "text/css",
href: "https://www.deskjock.reviews/assets/js/plugins/slick/slick-theme.css"
});
css_link_ca2.appendTo('head');
var css_link = $("", {
rel: "stylesheet",
type: "text/css",
href: "https://www.deskjock.reviews/assets/css/widgets/djcarousel.css"
});
css_link.appendTo('head');
/******* Load HTML *******/
var jsonp_url = "https://www.deskjock.reviews/embed/carousel/SGxQWXd4L3kxcnZ5dmx0Q1lVN2J2UT09?stars=5,4";
jQuery.getJSON(jsonp_url+"&callback=?", function(data) {
jQuery('#carousel_djReviews73').html( data.reviews);
});
});
}
})(); // We call our anonymous function immediately