UnityWorks! Media Wiki

UWM jQuery Integration - Cobalt NEW/USED (NewSiteTemplates)

Modified: 2010/07/28 16:18 by admin - Categorized as: Integration
   Integration Information:

The jQuery integration for UnityWorks! Media consists of various code snippets to generate the working product. The service is composed of JavaScript, jQuery functionality and Web Services hosted by UnityWorks! Works. The service will automatically display content for the known criteria provided in the snippets below. If the criteria does not match our records, no content nor notification will be displayed at the user level.

   Integration Process for USED & NEW Vehicles Only:

The following code is recommended to be place within the BODY tags of the html document. The highlighted ###### IDs will be provided to you by UnityWorks! Media as CTX ids for both new model specific and used vin specific.

Integration Code
<!-- UWM - Cobalt Integration NEW/USED -->
<script type="text/javascript" src="http://www.dealervideos.com/scripts/swfobject.js"></script>
<script type="text/javascript" src="http://www.dealervideos.com/scripts/jquery-cobalt.js"></script>
<script type="text/javascript">
        var new_ctx = "###new###";
        var used_ctx = "###used###";

        function uwmGetVinArray() {
            var uwm_vin = ContextManager.getVin();
            var vinArray = new Array(uwm_vin);
            return vinArray;
        }
        function uwmVideoAvailableHandler(vehicle, ele) {
	    ele.append('<img src="http://www.dealervideos.com/css/fdIcons/0004.png"></img>');
            uwmExternalPopUp(vehicle, ele);
        }
        function uwmVideoUnavailableHandler(vehicle, ele) {
           ele.hide();
        }
</script>

Once the code above has been implemented, please apply the following code anywhere within the BODY tags of the html document. This will be the location the "Play Video" icon will render.

Content Notification
<div id="uwm_video" style="cursor:hand"></div>

In addition, any valid html object is valid for use. The only requirement is to use an ID with the following value "uwm_video".

   Integration Notes:

If a jQuery build is already in use within the host website. Please remove the jQuery sources from the snippet above to reduce downloading times and any script conflicts. If the latest jQuery 1.3.2 is currently not in use, UnityWorks! Media suggests to download the latest build to prevent any script conflicts. You can find more information at jQuery.com

2008 UnityWorks! Media