var NcmMediaAlbum = $jq.createNcmClass({
   fields: {
      id: null,            /*Id of component*/
      simplefields:{},      /*Simple fields*/
      eventsListeners: {},   /*Events listeners of the component*/
      triggers: {},         /*Triggers id's (who affects me)*/
      triggersMap: [],      /*Triggers map*/
      items: {},            /*Items of Media library*/
      itemsMap: [],         /*Relates index and id of item*/
      subcategoryId: null,   /*Sub-category selected by user*/
      lastLoadedPage: null,   /*Current batch*/
      totalPages: 0,         /*Total of batches*/
      first: null,         /*Index of first visible item*/
      totalItems: null,      /*Number of items*/
      selectedIndex: null,   /*Selected index*/
      thumbnail: "",         /*Name of thumbnail field*/
      object: "",            /*Name of object field*/
      download: "",         /*Name of download field*/
      thumbnailWidth: 96,      /*Thumbnail width*/
      dsType: -1,            /*Data source type*/
      descrFields: [],      /*Description fields*/   
      descrThumbFields: [],   /*Description thumbnail fields*/
      lightBoxInited: false,
      requestParams: []
   },
   prototype: {
      initComponent: function(jsonData) {
         this.initAlbum(jsonData);
         //Initialize next and previous buttons events
         var Me = this;
         $jq(this.getPrevSelector()).live("click",function(){
            Me.scroll(-1);
         }).live("keypress",function(){
            Me.scroll(-1);
         });
         $jq(this.getNextSelector()).live("click",function(){
            Me.scroll(1);
         }).live("keypress",function(){
            Me.scroll(1);
         });
      },
      
      initAlbum: function(jsonData) {
         var Me = this;
         var m_initBatches = function(json){
            if(json){
               Me.lastLoadedPage = json.currentPage;
               Me.totalPages = json.totalPages;
               Me.totalItems = json.totalItems;
               Me.items = {};
               Me.itemsMap = [];
               Me.selectedIndex = 0;
               Me.first = 0;
               Me.thumbnail = json.thumbnail;
               Me.object = json.object;
               Me.download = json.download;
               Me.thumbnailWidth = json.thumbnailWidth;
               Me.dsType = json.dsType;
               Me.descrFields = json.descrFields;
               Me.descrThumbFields = json.descrThumbFields;
            }
         };
         var reqParams = ncm.getParametersFromUrl();
         var needLote = 0;
         var needFirst = 0;
         if(reqParams[ncm.concat(this.getDataSourcePrefix(),"currentPage",this.id)]){
            needLote = ncm.intval(reqParams[ncm.concat(this.getDataSourcePrefix(),"currentPage",this.id)]);
         }
         if(reqParams[ncm.concat(this.getDataSourcePrefix(),"first",this.id)]){
            needFirst = ncm.intval(reqParams[ncm.concat(this.getDataSourcePrefix(),"first",this.id)]);
         }
         if(window.location["search"]) {
            var qparamsnames = ncm.getParametersNamesFromString(window.location["search"].replace(/\?/,""));
            $jq.each(qparamsnames,function(ind,val){
               Me.setRequestParam(val,reqParams[val]);
            });
         }
         if(jsonData) {
            m_initBatches(jsonData);
            this.addItemsBatch(jsonData);
            this.initEvents();
            if(this.itemsMap[0]){
               if(this.dsType===ncm.DS_TYPE_GDATA_YOUTUBE){
                  this.getPreviewHTML(this.items[this.itemsMap[0]]);
               }
               this.createDownloadLink(this.itemsMap[0]);
            }
            if(needLote>this.lastLoadedPage){
               var m_getBatch = function(json){
                  Me.lastLoadedPage = json.currentPage;
                  Me.addItemsBatch(json);
                  if(Me.lastLoadedPage<needLote){
                     Me.getItemsBatch(m_getBatch);
                  } else {
                     Me.first = needFirst<(Me.lastLoadedPage+1)*parseInt(Me.simplefields["NUMROWS"])?needFirst:Me.lastLoadedPage*parseInt(Me.simplefields["NUMROWS"]);
                     if(Me.first<0) Me.first=0;
                     var last = Me.first + parseInt(Me.simplefields["NUMROWS"])-1;
                     if(last>Me.totalItems-1) {
                        last = Me.totalItems-1;
                     }
                     needLote = Me.getLoteNumber(last);
                     if(needLote>Me.lastLoadedPage){
                        Me.getItemsBatch(m_getBatch);
                     } else {
                        Me.drawItems(Me.first,last);
                        var proId = Me.getRequestParam(ncm.concat(Me.getDataSourcePrefix(),"ID"));
                        var proIdIndex = $jq.inArray(ncm.concat("item",proId),Me.itemsMap);
                        if(proIdIndex!==-1){
                           Me.selectedIndex = proIdIndex;
                           Me.createPreviewForIndex(Me.selectedIndex);
                        }
                     }   
                  }   
               };
               this.getItemsBatch(function(json){
                  m_getBatch(json);
               });
            } else {
               var proId = this.getRequestParam(ncm.concat(this.getDataSourcePrefix(),"ID"));
               var proIdIndex = $jq.inArray(ncm.concat("item",proId),this.itemsMap);
               if(proIdIndex!==-1){
                  this.selectedIndex = proIdIndex;
                  this.createPreviewForIndex(this.selectedIndex);
               }
            }
         } else {
            this.getItemsBatch(function(json){
               m_initBatches(json);
               Me.addItemsBatch(json);
               Me.drawItemsBatch(json);
               Me.initEvents();
               if(needLote>Me.lastLoadedPage){
                  var m_getBatch = function(json){
                     Me.lastLoadedPage = json.currentPage;
                     Me.addItemsBatch(json);
                     if(Me.lastLoadedPage<needLote){
                        Me.getItemsBatch(m_getBatch);
                     } else {
                        Me.first = needFirst<(Me.lastLoadedPage+1)*parseInt(Me.simplefields["NUMROWS"])?needFirst:Me.lastLoadedPage*parseInt(Me.simplefields["NUMROWS"]);
                        if(Me.first<0) Me.first=0;
                        var last = Me.first + parseInt(Me.simplefields["NUMROWS"])-1;
                        if(last>Me.totalItems-1) {
                           last = Me.totalItems-1;
                        }
                        needLote = Me.getLoteNumber(last);
                        if(needLote>Me.lastLoadedPage){
                           Me.getItemsBatch(m_getBatch);
                        } else {
                           Me.drawItems(Me.first,last);
                           var proId = Me.getRequestParam(ncm.concat(Me.getDataSourcePrefix(),"ID"));
                           var proIdIndex = $jq.inArray(ncm.concat("item",proId),Me.itemsMap);
                           if(proIdIndex!==-1){
                              Me.selectedIndex = proIdIndex;
                              Me.createPreviewForIndex(Me.selectedIndex);
                           }
                        }   
                     }   
                  };
                  Me.getItemsBatch(function(json){
                     m_getBatch(json);
                  });
               } else {
                  var proId = Me.getRequestParam(ncm.concat(Me.getDataSourcePrefix(),"ID"));
                  var proIdIndex = $jq.inArray(ncm.concat("item",proId),Me.itemsMap);
                  if(proIdIndex!==-1){
                     Me.selectedIndex = proIdIndex;
                     Me.createPreviewForIndex(Me.selectedIndex);
                  }
               }
            });   
         }
         /* Initialize the events listeners */
         ncm.bindCustomEvent(ncm.customEvents["ncmValueChange"],this.getAlbumSelector(),this,"filterCategory");
      },
      
      initLightbox: function(){
         if(this.dsType===ncm.DS_TYPE_GDATA_YOUTUBE) return;
         if(this.lightBoxInited) return;
         $jq(ncm.concat("a.lightbox",this.id),this.getAlbumSelector()).lightBox(window["options_lightbox"]);
         this.lightBoxInited = true;
      },

      addItemsBatch: function(json) {
         var Me = this;
         if(json && json["items"]) {
            $jq.each(json.items,function(index,val){
               Me.items["item" + this.PROID] = this;
               Me.itemsMap.push("item"+this.PROID);
            });
         }
      },
      
      getItemsBatch: function(callback){
         var jspfile = ncm.concat("components/albums/ncmalbum/ncmmediaalbum_",this.id,".jsp");
         var params = ncm.concat("page=",this.lastLoadedPage!=null?((this.lastLoadedPage+1>this.totalPages-1)?this.totalPages-1:this.lastLoadedPage+1):0,"&accessControl=",this.simplefields["CONTROL"],"&isDetails=",this.isDetails());
         if(this.subcategoryId!=null) {
            params = ncm.concat(params,"&CATID=",this.subcategoryId);
         }
         if(window.location["search"]){
            params = ncm.concat(params,window.location["search"].replace(/\?/,"&"));
         }   
         $jq.ajax({
            async: true,
             type: "POST",
             url: jspfile,
             data: params,
               dataType: "json",
             error: function(request,msg,ex) {
                   ncm.showError(msg,ex,request,NcmMediaAlbum.inPreview,NcmMediaAlbum.jsp_utils);
             },
             success: function(json) {
               if(callback) {
                  if($jq.isFunction(callback)){
                     callback(json);
                  }   
               }
             }
         });
      },
      
      drawItemsBatch: function(json){
         var Me = this;
         var html = [];
         if(json && json["items"]){
            html.push("<ul class=\"navigation\">");
            $jq.each(json.items,function(index,val){
               html.push(Me.getOneItemLi(this,index==0,0,0));
            });
            html.push("<\/ul>");
            $jq(this.getNavigationSelector()).html(html.join("")).show();
            $jq(this.getPrevSelector()).attr("class","nav-prev-disabled");
            $jq(this.getNextSelector()).attr("class",function(){
               var isDisabled = true;
               if(NcmMediaAlbum.getProperty("p_scrollmodel")=="1"){
                  isDisabled = json.items.length<2;
               } else {
                  isDisabled = json.items.length===Me.totalItems;
               }
               return ncm.concat("nav-next",isDisabled?"-disabled":"");
            });
         } else {
            $jq(this.getNavigationSelector()).html("").hide();
         }
         this.createPreviewForIndex(0);
      },
      
      drawItems: function(from,to){
         var Me = this;
         if(this.selectedIndex<from){
            this.selectedIndex = from;
         }
         if(this.selectedIndex>to){
            this.selectedIndex = to;
         }
         var html = [];
         html.push("<ul class=\"navigation\">");
         for(var i=from;i<=to;i+=1){
            html.push(this.getOneItemLi(this.items[this.itemsMap[i]],i==this.selectedIndex,this.getLoteNumber(i),from));
         }
         html.push("<\/ul>");
         $jq(this.getNavigationSelector()).html(html.join(""));
         this.createPreviewForIndex(this.selectedIndex);
         $jq(this.getPrevSelector()).attr("class",function(){
            return ncm.concat("nav-prev",from===0?"-disabled":"");
         });
         $jq(this.getNextSelector()).attr("class",function(){
            var isDisabled = true;
            if(NcmMediaAlbum.getProperty("p_scrollmodel")=="1"){
               isDisabled = (to===from && Me.simplefields["SCROLL_STEP"]>1) || to===(Me.totalItems-1);
            } else {
               isDisabled = to===(Me.totalItems-1);
            }
            return ncm.concat("nav-next",isDisabled?"-disabled":"");
         });
         this.initEvents();
      },
      
      getOneItemLi: function(jsonItem,selected,lotenum,from){
         var html = "";
         if(jsonItem && this.thumbnail){
            var downloadUrl = "";
            var thumbUrl = "";
            var descr = [];
            if(this.descrThumbFields.length>0){
               $jq.each(this.descrThumbFields,function(ind,val){
                  descr.push(jsonItem[val]);
               });
            }
            if(this.download){
               if(this.dsType===ncm.DS_TYPE_FILESYSTEM){
                  downloadUrl = ncm.concat(NcmMediaAlbum.getProperty("jsp_getimage"),"?filename=",jsonItem[this.download]["download"],"&hq=true");
               } else {
                  downloadUrl = jsonItem[this.download]["download"];
               }
            }
            if(jsonItem[this.thumbnail]["thumbnail"].indexOf("http:\/\/")===-1 && !jsonItem[this.thumbnail]["defThumbnail"]){
               thumbUrl = ncm.concat(NcmMediaAlbum.getProperty("jsp_getimage"),"?filename=",jsonItem[this.thumbnail]["thumbnail"],"&sizeX=",this.thumbnailWidth,"&hq=true");
            } else {
               thumbUrl = jsonItem[this.thumbnail]["thumbnail"];
            }
            html = ncm.concat("<li",(selected?" class=\"item-selected\"":""),">","<a href=\"",this.simplefields["DETAILSPAGE"]?ncm.concat(this.simplefields["DETAILSPAGE"],"?",this.getDataSourcePrefix(),"step=3","&",this.getDataSourcePrefix(),"ID=",jsonItem.PROID,"&",this.getDataSourcePrefix(),"currentPage",this.id,"=",lotenum,"&",this.getDataSourcePrefix(),"first",this.id,"=",from):downloadUrl,"\" title=\"\">","<img src=\"",thumbUrl,"\" alt=\"",jsonItem[this.thumbnail]["alt"],"\" title=\"",jsonItem[this.thumbnail]["title"],"\" id=\"item",jsonItem.PROID,"\" \/><\/a>",this.descrThumbFields.length>0?ncm.concat("<div class=\"",NcmMediaAlbum.getProperty("class_thumb_title"),"\"><span>",descr.join(" "),"<\/span><\/div>"):"","<\/li>");
         }
         return html;
      },
      
      getPreviewHTML: function(jsonItem) {
         if(jsonItem && this.object) {
            var jqViewer = $jq(this.getViewerSelector());
            var w = jqViewer.width();
            if(!w) w = parseInt(NcmMediaAlbum.getProperty("p_viewer_w"));
            var h = jqViewer.height();
            if(!h) h = parseInt(NcmMediaAlbum.getProperty("p_viewer_h"));
            if(this.dsType===ncm.DS_TYPE_GDATA_YOUTUBE){
               this.embedYouTubeVideo(jsonItem,w,h);
            } else {
               if(jsonItem[this.object]["isComplex"]){
                  try {
                     jqViewer.html(jsonItem[this.object]["value"]);
                  } catch(mErr){}
                  if(jsonItem["type"]==="VIDEO" || jsonItem["type"]==="AUDIO"){
                     try {
                        var player = $jq("a",this.getViewerSelector()).flowplayer(0);
                        player.unload();
                     } catch(mErr){}
                  }
                  if(jsonItem["type"]==="VIDEO" || jsonItem["type"]==="AUDIO"){
                     if(!window["flowplayer"]){
                        $jq("head").append(jsonItem[this.object]["head"]);
                     }
                  }
                  if(jsonItem["type"]==="FLASH"){
                     if(!window["swfobject"]){
                        $jq("head").append(jsonItem[this.object]["head"]);
                     }
                  }
                  eval(jsonItem[this.object]["onload"]);
               } else {
                  var Me = this;
                  jqViewer.html(ncm.concat("<img src=\"",NcmMediaAlbum.getProperty("jsp_getimage"),"?filename=",jsonItem[this.object]["object"],"&sizeX=",w,"&sizeY=",h,"&hq=true\" class=\"preview-image\" alt=\"\" title=\"\" \/>"));
                  $jq("img",jqViewer).load(function(){
                     Me.previewVerticalAlign();
                  });
               }   
            }   
         }
      },
      
      embedYouTubeVideo: function(jsonItem,w,h){
         var ytplayer = document.getElementById(ncm.concat("ytapiplayer",this.id));
         if(ytplayer) {
            ytplayer.stopVideo();
            ytplayer.clearVideo();
               var parent = $jq(ytplayer).parent();
               swfobject.removeSWF(ncm.concat("ytapiplayer",this.id));
               parent.html(ncm.concat("<div id=\"ytplayer",this.id,"\"><\/div>"));
         }
         var params = { allowScriptAccess: "always" };
          var atts = { id: ncm.concat("ytapiplayer",this.id) };
          swfobject.embedSWF(ncm.concat(jsonItem[this.object]["object"],"&enablejsapi=1&playerapiid=ytapiplayer",this.id), 
                             ncm.concat("ytplayer",this.id), ""+w, ""+h, "8", null, null, params, atts);
      },
      
      getDescriptionField: function(fieldName){
         var res = null;
         if(window[ncm.concat("jso",this.id)]){
            if(window[ncm.concat("jso",this.id)][ncm.MEDIA_DESCR_FIELDS_JSO]){
               $jq.each(window[ncm.concat("jso",this.id)][ncm.MEDIA_DESCR_FIELDS_JSO],function(ind,val){
                  var found = false;
                  $jq.each(this.simplefields,function(indj,valj){
                     if(this.name==="TITLE_ORG" && this.value===fieldName){
                        found = true;
                        return false;
                     }
                  });
                  if(found){
                     res = this;
                     return false;
                  }
               });
            }
         }
         return res;
      },
      
      hasLabelDescriptionField: function(fieldName){
         var res = false;
         var fld = this.getDescriptionField(fieldName);
         if(fld){
            $jq.each(fld.simplefields,function(indj,valj){
               if(this.name==="SHOWTITLE"){
                  res = this.value;
                  return false;
               }
            });
         }
         return res;
      },
      
      getLabelDescriptionField: function(fieldName){
         var res = "";
         var fld = this.getDescriptionField(fieldName);
         if(fld){
            $jq.each(fld.simplefields,function(indj,valj){
               if(this.name==="TITLE"){
                  res = this.value;
                  return false;
               }
            });
         }
         return res;
      },
      
      getDescriptionHTML: function(jsonItem) {
         var res = [];
         var Me = this;
         if(jsonItem && this.descrFields.length>0) {
            res.push("<dl>");
            $jq.each(this.descrFields,function(arrIndex,value){
               if(jsonItem[value]) {
                  res.push(ncm.concat("<dt>",Me.hasLabelDescriptionField(value)?Me.getLabelDescriptionField(value):"","<\/dt>"));
                  res.push(ncm.concat("<dd>",jsonItem[value],"<\/dd>"));
               }
            });
            res.push("<\/dl>");
         } 
         return res.join("");
      },
      
      getViewerSelector: function() {
         return ncm.concat("#viewer",this.id);
      },
      
      getNavigationSelector: function(){
         return ncm.concat("#navlist",this.id);
      },
      
      getDescriptionSelector: function() {
         return ncm.concat("#info",this.id," span.description");
      },
      
      getAlbumSelector: function() {
         return ncm.concat("#album",this.id);
      }, 
      
      getPrevSelector: function(){
         return ncm.concat("#navprev",this.id);
      },
      
      getNextSelector: function(){
         return ncm.concat("#navnext",this.id);
      },
      
      getInfoSelector: function(){
         return ncm.concat("#info",this.id);
      },
      
      createPreview: function(mediaId) {
         var jqViewer = $jq(this.getViewerSelector());
         if(mediaId && this.items[mediaId]) {
            var Me = this;
            var jqDescription = $jq(this.getDescriptionSelector());
            if(jqViewer.length>0){
               if(Me.dsType===ncm.DS_TYPE_GDATA_YOUTUBE){
                  window["auto-ytapiplayer"+Me.id] = true;
               }
               this.getPreviewHTML(this.items[mediaId]);
               $jq(this.getInfoSelector()).show();
               if(jqDescription.length>0){
                  jqDescription.html(this.getDescriptionHTML(this.items[mediaId]));
               }
               this.createDownloadLink(mediaId);
            }   
            $jq("li",this.getNavigationSelector()).removeClass("item-selected").find("img#"+mediaId).parent().parent().addClass("item-selected");
            this.updateNavigationState();
            ncm.triggerCustomEvent(ncm.customEvents["ncmValueChange"],this,"ID="+this.items[mediaId].PROID);
         } else {
            if(jqViewer.length>0){
               var txt = this.simplefields["LANG_NO_DATA"];
               if(!txt || $jq.trim(txt)===""){
                  txt = NcmMediaAlbum.getProperty("lang_no_data");
               }
               jqViewer.html(ncm.concat("<p>",txt,"<\/p>"));
               $jq(this.getInfoSelector()).hide();
            }   
         }
         return jqViewer.length===0;
      },
      
      createDownloadLink: function(mediaId){
         var Me = this;
         if(this.download && this.items[""+mediaId]){
            var downloadUrl = "";
            if(this.dsType===ncm.DS_TYPE_FILESYSTEM || this.items[""+mediaId][this.download]["dsType"]===ncm.DS_TYPE_FILESYSTEM){
               downloadUrl = ncm.concat(NcmMediaAlbum.getProperty("jsp_getimage"),"?filename=",this.items[""+mediaId][this.download]["download"],"&hq=true");
            } else {
               downloadUrl = this.items[""+mediaId][this.download]["download"];
            }
            var jqLink = $jq(ncm.concat("a.lightbox",this.id),this.getInfoSelector());
            if(this.items[""+mediaId]["type"]==="VIDEO" || this.items[""+mediaId]["type"]==="AUDIO" || this.items[""+mediaId]["type"]==="FLASH"){
               jqLink.hide();
            } else if(this.items[""+mediaId]["type"]==="IMAGE"){
               jqLink.show();
               this.initLightbox();
            }
            jqLink.attr("href",downloadUrl).attr("title","").attr("target",function(){
               return Me.download!==Me.object?"_blank":"_top"; 
            });
         }
      },
      
      createPreviewForIndex: function(index) {
         this.createPreview(this.itemsMap[index]);
      },
      
      filterCategory: function(catId,domElem) {
         this.subcategoryId = ncm.intval(catId);
         this.lastLoadedPage = null;
         this.initAlbum();
      },
      
      initEvents: function() {
         /* Initialize events on the jCarousel */
         var Me = this;
         var m_process = function(liElem){
            var mediaId = $jq("img",liElem).attr("id");
            Me.selectedIndex = $jq.inArray(mediaId,Me.itemsMap);
            return Me.createPreview(mediaId);
         };
         
         if(!this.simplefields["DETAILSPAGE"]){
            $jq("li a",this.getNavigationSelector()).click(function(){
               return m_process(this);
            }).keypress(function(){
               return m_process(this);
            });
         }   
      }, 
      
      updateNavigationState: function(){
         if(NcmMediaAlbum.getProperty("p_scrollmodel")!=="1") return;
         var Me = this;
         $jq(this.getPrevSelector()).attr("class",function(){
            return ncm.concat("nav-prev",Me.selectedIndex===0?"-disabled":"");
         });
         $jq(this.getNextSelector()).attr("class",function(){
            return ncm.concat("nav-next",(Me.selectedIndex===(Me.totalItems-1))?"-disabled":"");
         });
      },
      
      getLoteNumber: function(index){
         return (index-index%this.simplefields["NUMROWS"])/this.simplefields["NUMROWS"];
      },
      
      scroll: function(dir){
         if(dir===1 && $jq(this.getNextSelector()).hasClass("nav-next-disabled")){
            return;
         }
         if(dir===-1 && $jq(this.getPrevSelector()).hasClass("nav-prev-disabled")){
            return;
         }
         var Me = this;
         var selectedIndex = 0;
         $jq("li",this.getNavigationSelector()).each(function(ind){
            if($jq(this).hasClass("item-selected")){
               selectedIndex = ind;
            }
         });
         var moveToIndex = selectedIndex+dir*parseInt(this.simplefields["SCROLL_STEP"]);
         if(NcmMediaAlbum.getProperty("p_scrollmodel")=="1" && moveToIndex>=0 && moveToIndex<parseInt(this.simplefields["NUMROWS"])) {
            var moveto = this.first + selectedIndex + dir*parseInt(this.simplefields["SCROLL_STEP"]);
            this.selectedIndex += dir*parseInt(this.simplefields["SCROLL_STEP"]);
            this.createPreviewForIndex(moveto);
         } else {
            var oldfirst = this.first;
            this.first = this.first + dir*parseInt(this.simplefields["SCROLL_STEP"]);
            if(this.first<0) this.first=0;
            var last = this.first + parseInt(this.simplefields["NUMROWS"])-1;
            if(last>this.totalItems-1) {
               last = this.totalItems-1;
               first = (last-parseInt(this.simplefields["NUMROWS"])+1)>0?(last-parseInt(this.simplefields["NUMROWS"])+1):0;
            }
            this.selectedIndex += dir*parseInt(this.simplefields["SCROLL_STEP"]);
            var needLote = this.getLoteNumber(last);
            if(needLote>this.lastLoadedPage){
               var m_getBatch = function(json){
                  Me.lastLoadedPage = json.currentPage;
                  Me.addItemsBatch(json);
                  if(Me.lastLoadedPage<needLote){
                     Me.getItemsBatch(m_getBatch);
                  } else {
                     Me.drawItems(Me.first,last);
                  }   
               };
               this.getItemsBatch(function(json){
                  m_getBatch(json);
               });
            } else {
               this.drawItems(this.first,last);
            }
         }   
      },
      
      previewVerticalAlign: function(){
         var jqViewer = $jq(this.getViewerSelector());
         var hv = jqViewer.height();
         var jqImg = $jq("img",jqViewer);
         var hi = jqImg.height();
         var m = 0;
         if(hi>0){
            m = ((hv-hi)-(hv-hi)%2)/2;
         }   
         jqImg.css("margin-top",m+"px");
      },
      
      getDataSourceId: function() {
         return this.simplefields["DATASOURCE"]!=null?parseInt(this.simplefields["DATASOURCE"]):-1;   
       },
      
      getDataSourcePrefix: function(){
         return "DS"+this.getDataSourceId()+".";
      },
      
      isDetails : function(){
         var res = false;
         var arrParams = ncm.getParametersFromUrl();
         if(arrParams[ncm.concat(this.getDataSourcePrefix(),"PROID")] || arrParams["PROID"]){
            res = true;
         }
         return res;
      }
   }
});
/**
* Ceva form management class
* @author rmglez Nivaria Innova Team
*/
var NcmCevaForm = $jq.createNcmClass({
      fields: {
         id : null,
         simplefields : {},
         eventsListeners: {},     /*Events listeners*/
         eventsListenersAdv: {},         /*Events listeners of the component*/
         triggers: {},        /*Values of triggers*/
         triggersMap: []         /*Triggers map*/         
      },
      
      prototype: {
         initComponent: function(data) {
            this.initEvents();
         },
         
         initEvents: function() {
            ncm.bindCustomEvent(ncm.customEvents["ncmValueChange"],this.getFormSelector(),this,"reload");
         },
         actionButton: function(button, btId, validate, buttonPage) {
            var Me = this;  
                  ncm.exec(window,"showDisabledLayer");          
            try {
               updateRTEs();            
            }catch(err){}
            try {               
               ComboDouble.update(true);
            }catch(err){}
            var frm = $jq(Me.getFormSelector());
            if (!validate || (validate && frm.valid())) {
               var submited = $jq("#bt" + btId).attr("value");
               if (submited == "false") {
                  $jq("#bt" + btId).attr("value", "true");
                  var dialog = $jq('#dialog_' + btId);
                  if (dialog.length > 0) {
                     openDialog('#dialog_' + btId);
                  } else {
                   if (this.simplefields["AJAX_MODE"]) {
                                var data = ncm.concat($jq(this.getFormSelector()).serialize(),"&formId=",this.id,"&ajaxMode=1");
                                $jq.ajax({
                                    type: "POST",
                                    url: buttonPage,
                                    data: data,
                                    success: function(json){
                         ncm.exec(window,"hideDisabledLayer");
                                        ncm.triggerEvent(ncm.customEvents["ncmSuccess"], ["", Me.id]);
                         frm.parents(".floating-roc").hide("slow");
                         $jq("#page-disabling-mask").hide();
                         ncm.showDialog(Me.id,NcmCevaForm.getProperty("lang_success"),false);
                                    },
                                    error: function(json){
                         ncm.exec(window,"hideDisabledLayer");
                                        ncm.triggerEvent(ncm.customEvents["ncmError"], ["", Me.id]);
                         frm.parents(".floating-roc").hide("slow");
                         $jq("#page-disabling-mask").hide();
                         ncm.showDialog(Me.id,NcmCevaForm.getProperty("lang_error"),false);
                                    }
                                });
                            } else {
                     window.onbeforeunload = function() {};
                     frm.submit();
                   }
                  }
                  return false;
          }           
            } else {
               try {
                  ComboDouble.update(false);
               } catch (err) {      }
               $jq(".error:first").focus();
            }
            ncm.exec(window,"hideDisabledLayer");
            return false;
         },
         
         reload: function(params,reload){
            if (reload) {
               this.loadData(params);
            }
         },
         loadData: function(params){
            var Me = this;
            if(window["showDisabledLayer"]){
               if($jq.isFunction(window["showDisabledLayer"])){
                  showDisabledLayer();
               }
            }
            $jq.post(ncm.concat("sub_",this.id,".jsp"),params,function(html){
               $jq(Me.getFormSelector()).replaceWith(html);
               Me.initEvents();
               if(window["hideDisabledLayer"]){
                  if($jq.isFunction(window["hideDisabledLayer"])){
                     hideDisabledLayer();
                  }
               }
            },"html");
         },
         
      resetForm: function(){
         var Me = this;
         $jq(Me.getFormSelector() + " select").each(function(i){
            var id = $jq(this).parent().attr("id").replace("combo","");
            $jq(this).find('option:first').attr('selected', 'selected');
            $jq("#list_text_"+id).text( this.options[this.selectedIndex].text);
         });
      },

         getButtonsSelector: function() {
            var selector = this.getFormContainerSelector();
            selector += " div.form-action button.btnSend";
            return selector;
         },
         getFormSelector: function() {
            var selector = "#FRM"+this.id;
            return selector;
         },
         getFormContainerSelector: function() {
            var selector="#form-content" + this.id;
            return selector;
         }
      }
});
/**
* Combo management class
* @author rmglez, Nivaria Innova Team
*/

var Combo = $jq.createNcmClass({
	fields: {
		id: null,                   
		selectors: null,            /*Combo selectors*/
        simplefields: {},           /*Simple fields*/
		formSelector: String(""),   /*Form selector*/
		eventsListeners: {},        /*Events listeners*/
		eventsListenersAdv: {},		/*Events listeners of the component*/
		triggers: {},               /*Values of triggers*/
		triggersMap: [],            /*Triggers map*/		
		selectedValue: null         /*Stores the selected values before the combo is refreshed*/
	},
	prototype: {
		initComponent: function(data) {			
			this.selectors = data["selectors"];
			for (var i = 0; i < this.selectors.length; i++) {
				this.selectors[i] = this.getSelector(i);
			}
			this.initCombo();
		},
		
		initCombo: function() {
			for (var i = 0; i < this.selectors.length; i++) {
				this.initSelectEvents(this.selectors[i]);
				this.initSearchEvents(this.selectors[i]);
				// listen to refresh requests
				ncm.bindCustomEvent(ncm.customEvents["ncmValueChange"],this.selectors[i],this,"refresh",this.selectors[i]);
			}
		},
		
		initSearchEvents : function(selector) {
			var Me = this;
			var searchButtonSelector = this.getSearchButtonSelector();
			$jq(searchButtonSelector).click(function() { 
				var keyword = $jq(Me.getSearchSelector()).val();
				if(keyword.length >= 3 || keyword.length == 0) {
					Me.refresh(keyword, true, selector, true);
				}else{
					alert("Introduzca al menos 3 letras para poder buscar.");
				}
			});
		},
		
		initSelectEvents : function(selector) {
			var Me = this;
			// initialize event trigger
			$jq(selector).change(function() {
				Me.prepareChangeEvent(selector);
			});  
		},

		initMaskEvents : function() {
			for (var i = 0; i < this.selectors.length; i++) {
				this.prepareChangeEvent(this.selectors[i]);
			}	
		},
		  
		prepareChangeEvent : function(selector) {
			var Me = this;		
			var objId = this.getObjId(selector);
			var param = "dataId=" + this.id;			
			param += "&parentDS="+this.simplefields["DATASOURCE"]+"&DS"+this.simplefields["DATASOURCE"]+".ID=";
			$jq(selector).find("option:selected").each(function() {
				param += $jq(this).val();
				param += "&sourceObj="+objId;			
				ncm.triggerCustomEvent(ncm.customEvents["ncmValueChange"],Me,param);
			});  
		},
	  
		/**
		* Empty the combo
		*/
		emptyMask : function(selector) {
			var combo = $jq(selector);
			this.selectedValue = combo.children("option:selected").val();
			combo.empty();
		},
	  
		/**
		* Fill the from combo with the data parameter
		*/
		fillData : function(selector, data) {
			var combo = $jq(selector);
			combo.html(data);
			var selected = null;
			if (this.selectedValue) {
				selected = combo.children("option[value='"+this.selectedValue+"']");
			}
			if (!selected) {
				selected = combo.children("option")[0];
			}
			if (selected) {
				$jq(selected).attr("selected","selected");
			}
			combo.attr("class", combo.attr("class") );
			this.prepareChangeEvent(selector);      
		},
	  
		/**
		* Refresh the combo filtering the objects with the values stored in params
		*/
		refresh : function(params, reload, selector, isSearch) {
			var objId = this.getObjId(selector);
			var sourceObjId = params.substr(params.indexOf("&sourceObj=") + 11, params.length);
			if (objId == sourceObjId || isSearch) {
				var Me = this;
				if (isSearch)
					params = "keyword=" + params;
				params +="&inPreview=" + Combo.inPreview;
				params +="&language=" + Combo.language;
				params +="&pageUrl=" + Combo.pageUrl;
				params +="&channel=" + Combo.channel;
				params +="&issueId=" + Combo.issueId;
				params +="&DS=" + this.simplefields["DATASOURCE"];
				params +="&maskId=" + this.id;
				this.emptyMask(selector);
				var jspfile = (isSearch==true) ? Combo.getProperty("jsp_search") : Combo.getProperty("jsp_loadrelated");
				$jq.ajax({
					async: true,
					type: "POST",
					url: jspfile,
					data: params,
					dataType: "json",
					error: function(request,msg,ex) {
						ncm.showError(msg,ex,request);
						result = false;
					},
					success: function(json) {
						if(json!=null) {
							var html = '<option value="">'+Combo.getProperty("text_select")+'</option>';
							for (var i = 0; i < json.length; i++) {
								html += '<option value="'+json[i].id+'">'+json[i].name+'</option>';
							}
							Me.fillData(selector, html);
						}
					}
				});
			}
		},
	  
		getSelector: function(i) {
			var selector = "[name='" + this.selectors[i] + "']";
			return selector;
		},
		
		getObjId: function(selector) {
			var name = selector.substring(7, selector.length - 2);
			var fldInfo = name.split(":");
			if (fldInfo.length == 3) {
				return fldInfo[2];
			}
			return -1; 
		},
		
		getSearchSelector : function() {
			var selector = "#search_" + this.id;
			return selector;
		},
		
		getSearchButtonSelector : function() {
			var selector = "[name='btsearch_" + this.id + "']";
			return selector;
		}

	}
});

var jso87241 = {"properties":[{"name":"css_default"},{"name":"js_default","value":"components/albums/ncmalbum/ncmmediaalbum.js"},{"name":"jsp_default","value":"components/albums/ncmalbum/ncmmediaalbum.jsp"},{"name":"jsp_getimage","value":"ncm/getImage.jsp"},{"name":"img_download","value":"components/albums/img/preview-zoom.gif"},{"name":"p_numcols","value":"5"},{"name":"p_numrows","value":"1"},{"name":"p_thumbskin","value":"SKIN_IMAGE_QUERY"},{"name":"p_thumbwidth","value":"130"},{"name":"p_scrollmodel","value":"1"},{"name":"p_viewer_w","value":"460"},{"name":"p_viewer_h","value":"345"},{"name":"lang_next","value":"Siguiente"},{"name":"lang_previous","value":"Anterior"},{"name":"lang_download","value":"Descargar"},{"name":"lang_no_data","value":"No ha sido encontrado los ítems"},{"name":"amp","value":"amp;"},{"name":"class_thumb_title","value":"img-lower-button"},{"name":"separator","value":"/"}]};  
    $jq.extend(jso87241,{"simplefields":[{"name":"TITLE"},{"name":"DATASOURCE","value":"107"},{"name":"PARENT_DATASOURCE"},{"name":"DETAILSPAGE"},{"name":"XSLT"},{"name":"SCROLL_STEP","value":"1"},{"name":"HIDE_VIEWER","value":true},{"name":"SHOW_PAGER","value":false},{"name":"CONTROL","value":false},{"name":"LANG_NO_DATA"},{"name":"HIDE_NO_DATA","value":false},{"name":"USE_CACHE","value":false},{"name":"DS_USE_OTHER","value":false},{"name":"DS_USE_NEW"}]});  
      
    jso87241["RELATIONS"] = [];
jso87241[ncm.SIMPLE_FIELDS_JSO].push({name:"NUMROWS",value:""+1*1});  
    jso87241[ncm.SIMPLE_FIELDS_JSO].push({name:"IMAGE_SKIN",value:"SKIN_IMAGE_QUERY"});  
    jso87241[ncm.SIMPLE_FIELDS_JSO].push({name:"IMAGE_WIDTH",value:"530"});  
    jso87241[ncm.SIMPLE_FIELDS_JSO].push({name:"TITLEDETAIL",value:null});  
    jso87241[ncm.SIMPLE_FIELDS_JSO].push({name:"VIEWER_WIDTH",value:"460"});  
    jso87241[ncm.SIMPLE_FIELDS_JSO].push({name:"VIEWER_HEIGHT",value:"345"});  
    jso87241[ncm.SIMPLE_FIELDS_JSO].push({name:"TEMPLATE",value:""});  

    var jsoFields87241 = [];  
    var jsoDescrFields87241 = [];  
    var jsoThumbFields87241 = [];  
    var jsoThumbField87241 = {};  
    var jsoObjField87241 = {};  
    var jsoDownField87241 = {};  
    var jsoOrders87241 = [];  
    var jsoParams87241 = [];  
      
      
      
      
        var f87240 = {"simplefields":[{"name":"TITLE","value":"Descripción"},{"name":"TITLE_ORG","value":"DESCRIPTION:1555"},{"name":"DT","value":"RICHTEXT"},{"name":"PFROM"},{"name":"PTO"},{"name":"POSITION"},{"name":"ISKEY","value":false},{"name":"DATASOURCE"},{"name":"SHOW","value":false},{"name":"SHOWTITLE","value":false},{"name":"INCALENDAR","value":false},{"name":"ISMULTIPLE","value":false}]};  
	  jsoFields87241.push(f87240);  
        jsoThumbFields87241.push(f87240);  
      
      
          
	      jsoThumbField87241 = {"simplefields":[{"name":"TITLE","value":"Media"},{"name":"TITLE_ORG","value":"MEDIA:1555"},{"name":"DT","value":"DSOBJ"},{"name":"PFROM"},{"name":"PTO"},{"name":"POSITION"},{"name":"ISKEY","value":false},{"name":"DATASOURCE"},{"name":"SHOW","value":false},{"name":"SHOWTITLE","value":false},{"name":"INCALENDAR","value":false},{"name":"ISMULTIPLE","value":false}]};  
	      jsoFields87241.push(jsoThumbField87241);  
	    
      
      
          
	      jsoObjField87241 = {"simplefields":[{"name":"TITLE","value":"Media"},{"name":"TITLE_ORG","value":"MEDIA:1555"},{"name":"DT","value":"DSOBJ"},{"name":"PFROM"},{"name":"PTO"},{"name":"POSITION"},{"name":"ISKEY","value":false},{"name":"DATASOURCE"},{"name":"SHOW","value":false},{"name":"SHOWTITLE","value":false},{"name":"INCALENDAR","value":false},{"name":"ISMULTIPLE","value":false}]};  
	      jsoFields87241.push(jsoObjField87241);  
	    
      
      
          
	      jsoDownField87241 = {"simplefields":[{"name":"TITLE","value":"Media"},{"name":"TITLE_ORG","value":"MEDIA:1555"},{"name":"DT","value":"DSOBJ"},{"name":"PFROM"},{"name":"PTO"},{"name":"POSITION"},{"name":"ISKEY","value":false},{"name":"DATASOURCE"},{"name":"SHOW","value":false},{"name":"SHOWTITLE","value":false},{"name":"INCALENDAR","value":false},{"name":"ISMULTIPLE","value":false}]};  
	      jsoFields87241.push(jsoDownField87241);  
	    
      
      
      
    jso87241[ncm.DT_JSO] = "ALBUM_MEDIA_NIVARIA";  
    jso87241[ncm.DS_FIELDS_JSO] = jsoFields87241;  
    jso87241[ncm.MEDIA_DESCR_FIELDS_JSO] = jsoDescrFields87241;  
    jso87241[ncm.MEDIA_THUMB_FIELDS_JSO] = jsoThumbFields87241;  
    jso87241[ncm.MEDIA_THUMBNAIL_JSO] = jsoThumbField87241;  
    jso87241[ncm.MEDIA_OBJECT_JSO] = jsoObjField87241;  
    jso87241[ncm.MEDIA_DOWNLOAD_JSO] = jsoDownField87241;  
    jso87241[ncm.QUERY_GROUPBY_FIELDS_JSO] = [];  
    jso87241[ncm.QUERY_LAYOUTS_JSO] = [];  
    jso87241[ncm.QUERY_TOTALS_JSO] = [];  
    jso87241[ncm.QUERY_ORDERBY_FIELDS_JSO] = jsoOrders87241;  
    jso87241[ncm.QUERY_GEOFIELDS_JSO] = {};  
    jso87241[ncm.QUERY_PARAMS_JSO] = jsoParams87241;
var options_lightbox = {  
	      overlayBgColor: "#000000",  
	      overlayOpacity: 0.8,  
	      imageLoading: "lib/jquery-lightbox-0.5/images/lightbox-ico-loading.gif",  
	      imageBtnClose: "lib/jquery-lightbox-0.5/images/lightbox-btn-close.gif",  
	      imageBtnPrev: "lib/jquery-lightbox-0.5/images/lightbox-btn-prev.gif",  
	      imageBtnNext: "lib/jquery-lightbox-0.5/images/lightbox-btn-next.gif",  
	      containerBorderSize: 10,  
	      containerResizeSpeed: 400,  
	      txtImage: "Imagen",  
	      txtOf: "de",  
	      imageBlank: "lib/jquery-lightbox-0.5/images/lightbox-blank.gif",  
	      keyToClose: "c",  
	      keyToPrev: "p",  
	      keyToNext: "n"  
	  };
$jq(function(){   
     
 
 
 
var options = {     
    datatype: "ALBUM_MEDIA_NIVARIA",     
    language: "ES",     
    jsp_utils: "components/components-utils.jsp",     
    pageUrl: "transit_kombi.jsp",     
    channel: "DEFAULT",     
    inPreview: false,     
    issueId: 3,     
    skin: "FUNC_JS_INIT_PROPERTIES",   
    pageId: 644,   
    json: jso87241     
};     
if(window["NcmMediaAlbum"]){   
    if(NcmMediaAlbum["instances"]==null){  
	  NcmMediaAlbum.initProperties(options);     
    }  
}   
});
var jso87246 = {"properties":[]};  
    $jq.extend(jso87246,{"simplefields":[{"name":"NAME","value":"¡Quiero probarlo!"},{"name":"URL"},{"name":"ACCESSKEY"},{"name":"TEXT"},{"name":"LINKTYPE","value":false},{"name":"FILESIZE"},{"name":"EXTENTION"},{"name":"ISPROTECTED","value":false},{"name":"PROTECTED_OBJECT"},{"name":"DOMAIN"},{"name":"RIGHT_ALIGN","value":false}]});  
      
    jso87246["RELATIONS"] = [];  
      
          
			  
				 
					try { 
						var jso218497 = {"simplefields":[{"name":"NAME","value":"Relación"},{"name":"DATAID","value":"217562"},{"name":"DESCRIPTION_DATAID","value":"Body group - ROC Quiero Probar Vehículo Nuevo (ROC)"},{"name":"EVENTS","value":["ncmValueChange"]},{"name":"SOURCE_DATASOURCE"},{"name":"DEST_DATASOURCE"}]}; 
						var jso_complexfields = []; 
						 
						jso218497["complexfields"] = jso_complexfields; 
						jso87246["RELATIONS"].push(jso218497); 
					} catch(err) {alert(err);} 
					if(!ncm.customEventsTriggers["217562"]){  
						ncm.customEventsTriggers["217562"] = [];  
					}  
					ncm.customEventsTriggers["217562"].push(87246);
var jso87264 = {"properties":[{"name":"css_default"},{"name":"js_default","value":"components/albums/ncmalbum/ncmmediaalbum.js"},{"name":"jsp_default","value":"components/albums/ncmalbum/ncmmediaalbum.jsp"},{"name":"jsp_getimage","value":"ncm/getImage.jsp"},{"name":"img_download","value":"components/albums/img/preview-zoom.gif"},{"name":"p_numcols","value":"5"},{"name":"p_numrows","value":"1"},{"name":"p_thumbskin","value":"SKIN_IMAGE_QUERY"},{"name":"p_thumbwidth","value":"130"},{"name":"p_scrollmodel","value":"1"},{"name":"p_viewer_w","value":"460"},{"name":"p_viewer_h","value":"345"},{"name":"lang_next","value":"Siguiente"},{"name":"lang_previous","value":"Anterior"},{"name":"lang_download","value":"Descargar"},{"name":"lang_no_data","value":"No ha sido encontrado los ítems"},{"name":"amp","value":"amp;"},{"name":"class_thumb_title","value":"img-lower-button"},{"name":"separator","value":"/"}]};  
    $jq.extend(jso87264,{"simplefields":[{"name":"TITLE","value":"Álbum media - Coches"},{"name":"DATASOURCE","value":"108"},{"name":"PARENT_DATASOURCE"},{"name":"DETAILSPAGE"},{"name":"XSLT"},{"name":"SCROLL_STEP","value":"1"},{"name":"HIDE_VIEWER","value":true},{"name":"SHOW_PAGER","value":false},{"name":"CONTROL","value":false},{"name":"LANG_NO_DATA"},{"name":"HIDE_NO_DATA","value":false},{"name":"USE_CACHE","value":false},{"name":"DS_USE_OTHER","value":false},{"name":"DS_USE_NEW"}]});  
      
    jso87264["RELATIONS"] = [];
jso87264[ncm.SIMPLE_FIELDS_JSO].push({name:"NUMROWS",value:""+5*1});  
    jso87264[ncm.SIMPLE_FIELDS_JSO].push({name:"IMAGE_SKIN",value:"SKIN_IMAGE_QUERY"});  
    jso87264[ncm.SIMPLE_FIELDS_JSO].push({name:"IMAGE_WIDTH",value:"130"});  
    jso87264[ncm.SIMPLE_FIELDS_JSO].push({name:"TITLEDETAIL",value:null});  
    jso87264[ncm.SIMPLE_FIELDS_JSO].push({name:"VIEWER_WIDTH",value:"460"});  
    jso87264[ncm.SIMPLE_FIELDS_JSO].push({name:"VIEWER_HEIGHT",value:"345"});  
    jso87264[ncm.SIMPLE_FIELDS_JSO].push({name:"TEMPLATE",value:"ALBUM_MEDIA_POPUP"});  

    var jsoFields87264 = [];  
    var jsoDescrFields87264 = [];  
    var jsoThumbFields87264 = [];  
    var jsoThumbField87264 = {};  
    var jsoObjField87264 = {};  
    var jsoDownField87264 = {};  
    var jsoOrders87264 = [];  
    var jsoParams87264 = [];  
      
      
	  var f87262 = {"simplefields":[{"name":"TITLE","value":"Descripción"},{"name":"TITLE_ORG","value":"DESCRIPTION:1555"},{"name":"DT","value":"RICHTEXT"},{"name":"PFROM"},{"name":"PTO"},{"name":"POSITION"},{"name":"ISKEY","value":false},{"name":"DATASOURCE","value":"undefined"},{"name":"SHOW","value":false},{"name":"SHOWTITLE","value":false},{"name":"INCALENDAR","value":false},{"name":"ISMULTIPLE","value":false}]};  
	  jsoFields87264.push(f87262);  
	  jsoDescrFields87264.push(f87262);  
      
      
      
        var f87263 = {"simplefields":[{"name":"TITLE","value":"Nombre"},{"name":"TITLE_ORG","value":"NAME:1555"},{"name":"DT","value":"TEXT"},{"name":"PFROM"},{"name":"PTO"},{"name":"POSITION"},{"name":"ISKEY","value":false},{"name":"DATASOURCE"},{"name":"SHOW","value":false},{"name":"SHOWTITLE","value":false},{"name":"INCALENDAR","value":false},{"name":"ISMULTIPLE","value":false}]};  
	  jsoFields87264.push(f87263);  
        jsoThumbFields87264.push(f87263);  
      
      
          
	      jsoThumbField87264 = {"simplefields":[{"name":"TITLE","value":"Media"},{"name":"TITLE_ORG","value":"MEDIA:1555"},{"name":"DT","value":"DSOBJ"},{"name":"PFROM"},{"name":"PTO"},{"name":"POSITION"},{"name":"ISKEY","value":false},{"name":"DATASOURCE"},{"name":"SHOW","value":false},{"name":"SHOWTITLE","value":false},{"name":"INCALENDAR","value":false},{"name":"ISMULTIPLE","value":false}]};  
	      jsoFields87264.push(jsoThumbField87264);  
	    
      
      
          
	      jsoObjField87264 = {"simplefields":[{"name":"TITLE","value":"Media"},{"name":"TITLE_ORG","value":"MEDIA:1555"},{"name":"DT","value":"DSOBJ"},{"name":"PFROM"},{"name":"PTO"},{"name":"POSITION"},{"name":"ISKEY","value":false},{"name":"DATASOURCE"},{"name":"SHOW","value":false},{"name":"SHOWTITLE","value":false},{"name":"INCALENDAR","value":false},{"name":"ISMULTIPLE","value":false}]};  
	      jsoFields87264.push(jsoObjField87264);  
	    
      
      
          
	      jsoDownField87264 = {"simplefields":[{"name":"TITLE","value":"Media"},{"name":"TITLE_ORG","value":"MEDIA:1555"},{"name":"DT","value":"DSOBJ"},{"name":"PFROM"},{"name":"PTO"},{"name":"POSITION"},{"name":"ISKEY","value":false},{"name":"DATASOURCE"},{"name":"SHOW","value":false},{"name":"SHOWTITLE","value":false},{"name":"INCALENDAR","value":false},{"name":"ISMULTIPLE","value":false}]};  
	      jsoFields87264.push(jsoDownField87264);  
	    
      
      
      
    jso87264[ncm.DT_JSO] = "ALBUM_MEDIA_NIVARIA";  
    jso87264[ncm.DS_FIELDS_JSO] = jsoFields87264;  
    jso87264[ncm.MEDIA_DESCR_FIELDS_JSO] = jsoDescrFields87264;  
    jso87264[ncm.MEDIA_THUMB_FIELDS_JSO] = jsoThumbFields87264;  
    jso87264[ncm.MEDIA_THUMBNAIL_JSO] = jsoThumbField87264;  
    jso87264[ncm.MEDIA_OBJECT_JSO] = jsoObjField87264;  
    jso87264[ncm.MEDIA_DOWNLOAD_JSO] = jsoDownField87264;  
    jso87264[ncm.QUERY_GROUPBY_FIELDS_JSO] = [];  
    jso87264[ncm.QUERY_LAYOUTS_JSO] = [];  
    jso87264[ncm.QUERY_TOTALS_JSO] = [];  
    jso87264[ncm.QUERY_ORDERBY_FIELDS_JSO] = jsoOrders87264;  
    jso87264[ncm.QUERY_GEOFIELDS_JSO] = {};  
    jso87264[ncm.QUERY_PARAMS_JSO] = jsoParams87264;
if(window["NcmMediaAlbum"]){
    $jq.extendNcmClass(NcmMediaAlbum,{
	  prototype: {
	      getOneItemLi: function(jsonItem,selected,lotenum,from){

		    if ( this.simplefields["TEMPLATE"]=='ALBUM_MEDIA_POPUP' ){


		    var html = "";
		    if(jsonItem && this.thumbnail){

		      var downloadUrl = "";
		      var thumbUrl = "";
		      var descr = [];
		      var popup = [];
		      if(this.descrThumbFields.length>0){
			    $jq.each(this.descrThumbFields,function(ind,val){
				  descr.push(jsonItem[val]);
			    });
		      }
		      if(this.descrFields.length>0){
			    $jq.each(this.descrFields,function(ind,val){
				  popup.push(jsonItem[val]);
			    });
		      }
		      if(this.download){
			    if(this.dsType===ncm.DS_TYPE_FILESYSTEM){
				  downloadUrl = ncm.concat(NcmMediaAlbum.getProperty("jsp_getimage"),"?filename=",jsonItem[this.download]["download"],"&hq=true");
			    } else {
				  downloadUrl = jsonItem[this.download]["download"];
			    }
		      }
		      if(jsonItem[this.thumbnail]["thumbnail"].indexOf("http:\/\/")===-1 && !jsonItem[this.thumbnail]["defThumbnail"]){
			    thumbUrl = ncm.concat(NcmMediaAlbum.getProperty("jsp_getimage"),"?filename=",jsonItem[this.thumbnail]["thumbnail"],"&sizeX=",this.thumbnailWidth,"&hq=true");
		      } else {
			    thumbUrl = jsonItem[this.thumbnail]["thumbnail"];
		      }
		      html = ncm.concat("<","li",(selected?" class=\"item-selected\"":""),">","<","a class=\"item-selected-a\" href=\"",this.simplefields["DETAILSPAGE"]?ncm.concat(this.simplefields["DETAILSPAGE"],"?",this.getDataSourcePrefix(),"step=3","&",this.getDataSourcePrefix(),"ID=",jsonItem.PROID,"&",this.getDataSourcePrefix(),"currentPage",this.id,"=",lotenum,"&",this.getDataSourcePrefix(),"first",this.id,"=",from):downloadUrl,"\" title=\"\"",">");
			  html = ncm.concat(html,"<","img src=\"",thumbUrl,"\" alt=\"",jsonItem[this.thumbnail]["alt"],"\" title=\"",jsonItem[this.thumbnail]["title"],"\" id=\"item",jsonItem.PROID,"\" \/",">");
			  html = ncm.concat(html,this.descrThumbFields.length>0?ncm.concat("<","div class=\"",NcmMediaAlbum.getProperty("class_thumb_title"),"\"",">","<","span",">",descr.join(" "),"<","\/span",">","<","\/div",">"):"","<","\/a",">","<","div class=\"album-media-item-popup\"",">","<","div class=\"album-media-item-popup-close\"",">","cerrar x","<","\/div",">",popup.join(" "),"<","\/div",">","<","\/li",">");
		    }
		    return html;

		    } else {

		      var html = "";
			if(jsonItem && this.thumbnail){
				var downloadUrl = "";
				var thumbUrl = "";
				var descr = [];
				if(this.descrThumbFields.length>0){
					$jq.each(this.descrThumbFields,function(ind,val){
						descr.push(jsonItem[val]);
					});
				}
				if(this.download){
					if(this.dsType===ncm.DS_TYPE_FILESYSTEM){
						downloadUrl = ncm.concat(NcmMediaAlbum.getProperty("jsp_getimage"),"?filename=",jsonItem[this.download]["download"],"&hq=true");
					} else {
						downloadUrl = jsonItem[this.download]["download"];
					}
				}
				if(jsonItem[this.thumbnail]["thumbnail"].indexOf("http:\/\/")===-1 && !jsonItem[this.thumbnail]["defThumbnail"]){
					thumbUrl = ncm.concat(NcmMediaAlbum.getProperty("jsp_getimage"),"?filename=",jsonItem[this.thumbnail]["thumbnail"],"&sizeX=",this.thumbnailWidth,"&hq=true");
				} else {
					thumbUrl = jsonItem[this.thumbnail]["thumbnail"];
				}
				html = ncm.concat("<li",(selected?" class=\"item-selected\"":""),">","<a href=\"",this.simplefields["DETAILSPAGE"]?ncm.concat(this.simplefields["DETAILSPAGE"],"?",this.getDataSourcePrefix(),"step=3","&",this.getDataSourcePrefix(),"ID=",jsonItem.PROID,"&",this.getDataSourcePrefix(),"currentPage",this.id,"=",lotenum,"&",this.getDataSourcePrefix(),"first",this.id,"=",from):downloadUrl,"\" title=\"\">","<img src=\"",thumbUrl,"\" alt=\"",jsonItem[this.thumbnail]["alt"],"\" title=\"",jsonItem[this.thumbnail]["title"],"\" id=\"item",jsonItem.PROID,"\" \/>","<\/a>",this.descrThumbFields.length>0?ncm.concat("<div class=\"",NcmMediaAlbum.getProperty("class_thumb_title"),"\"><span>",descr.join(" "),"<\/span><\/div>"):"","<\/li>");
			}
			return html;

		    }
	      }
	  }
    });
	
	$jq(".album-media-item-popup-close").liveLinkEvents(function() {
		$jq(this).parent().hide();
	});
	$jq(".item-selected-a").liveLinkEvents(function() {
		$jq(".album-media-item-popup").hide();
		$jq(this).parent().find(".album-media-item-popup").show();
		return false;
	});
}
var jso174540 = {"properties":[]};  
    $jq.extend(jso174540,{"simplefields":[{"name":"NAME","value":"Contáctanos"},{"name":"URL","value":"contactar.jsp"},{"name":"ACCESSKEY"},{"name":"TEXT"},{"name":"LINKTYPE","value":false},{"name":"FILESIZE"},{"name":"EXTENTION"},{"name":"ISPROTECTED","value":false},{"name":"PROTECTED_OBJECT"},{"name":"DOMAIN"},{"name":"RIGHT_ALIGN","value":false}]});  
      
    jso174540["RELATIONS"] = [];  
      
          
			  
				 
					try { 
						var jso174538 = {"simplefields":[{"name":"NAME"},{"name":"DATAID","value":"174622"},{"name":"DESCRIPTION_DATAID","value":"ROC Contacto (ROC)"},{"name":"EVENTS","value":["ncmValueChange"]},{"name":"SOURCE_DATASOURCE"},{"name":"DEST_DATASOURCE"}]}; 
						var jso_complexfields = []; 
						 
						jso174538["complexfields"] = jso_complexfields; 
						jso174540["RELATIONS"].push(jso174538); 
					} catch(err) {alert(err);} 
					if(!ncm.customEventsTriggers["174622"]){  
						ncm.customEventsTriggers["174622"] = [];  
					}  
					ncm.customEventsTriggers["174622"].push(174540);
var jso148270 = {"properties":[]};  
    $jq.extend(jso148270,{"simplefields":[{"name":"NAME","value":"Tenerife - Mayorazgo"},{"name":"POLY_COORDS","value":"142,54,4"},{"name":"SHAPE","value":"circle"}]});  
      
    jso148270["RELATIONS"] = [];  
      
          
			  
				 
					try { 
						var jso148268 = {"simplefields":[{"name":"NAME","value":"ROC"},{"name":"DATAID","value":"155186"},{"name":"DESCRIPTION_DATAID","value":"Content - Delegación El Mayorazgo (ROC)"},{"name":"EVENTS","value":["ncmRollover"]},{"name":"SOURCE_DATASOURCE"},{"name":"DEST_DATASOURCE"}]}; 
						var jso_complexfields = []; 
						 
						jso148268["complexfields"] = jso_complexfields; 
						jso148270["RELATIONS"].push(jso148268); 
					} catch(err) {alert(err);} 
					if(!ncm.customEventsTriggers["155186"]){  
						ncm.customEventsTriggers["155186"] = [];  
					}  
					ncm.customEventsTriggers["155186"].push(148270);
var jso148273 = {"properties":[]};  
    $jq.extend(jso148273,{"simplefields":[{"name":"NAME","value":"Tenerife - Orotava"},{"name":"POLY_COORDS","value":"125,61,4"},{"name":"SHAPE","value":"circle"}]});  
      
    jso148273["RELATIONS"] = [];  
      
          
			  
				 
					try { 
						var jso148271 = {"simplefields":[{"name":"NAME","value":"ROC"},{"name":"DATAID","value":"155188"},{"name":"DESCRIPTION_DATAID","value":"Content - Delegación Tenerife Orotava (ROC)"},{"name":"EVENTS","value":["ncmRollover"]},{"name":"SOURCE_DATASOURCE"},{"name":"DEST_DATASOURCE"}]}; 
						var jso_complexfields = []; 
						 
						jso148271["complexfields"] = jso_complexfields; 
						jso148273["RELATIONS"].push(jso148271); 
					} catch(err) {alert(err);} 
					if(!ncm.customEventsTriggers["155188"]){  
						ncm.customEventsTriggers["155188"] = [];  
					}  
					ncm.customEventsTriggers["155188"].push(148273);
var jso148276 = {"properties":[]};  
    $jq.extend(jso148276,{"simplefields":[{"name":"NAME","value":"Tenerife - Las Chafiras"},{"name":"POLY_COORDS","value":"125,81,4"},{"name":"SHAPE","value":"circle"}]});  
      
    jso148276["RELATIONS"] = [];  
      
          
			  
				 
					try { 
						var jso148274 = {"simplefields":[{"name":"NAME","value":"ROC"},{"name":"DATAID","value":"155189"},{"name":"DESCRIPTION_DATAID","value":"Content - Delegación Tenerife Las Chafiras (ROC)"},{"name":"EVENTS","value":["ncmRollover"]},{"name":"SOURCE_DATASOURCE"},{"name":"DEST_DATASOURCE"}]}; 
						var jso_complexfields = []; 
						 
						jso148274["complexfields"] = jso_complexfields; 
						jso148276["RELATIONS"].push(jso148274); 
					} catch(err) {alert(err);} 
					if(!ncm.customEventsTriggers["155189"]){  
						ncm.customEventsTriggers["155189"] = [];  
					}  
					ncm.customEventsTriggers["155189"].push(148276);
var jso148279 = {"properties":[]};  
    $jq.extend(jso148279,{"simplefields":[{"name":"NAME","value":"Fuerteventura"},{"name":"POLY_COORDS","value":"159,143,4"},{"name":"SHAPE","value":"circle"}]});  
      
    jso148279["RELATIONS"] = [];  
      
          
			  
				 
					try { 
						var jso148277 = {"simplefields":[{"name":"NAME","value":"ROC"},{"name":"DATAID","value":"155190"},{"name":"DESCRIPTION_DATAID","value":"Content - Delegación Fuerteventura (ROC)"},{"name":"EVENTS","value":["ncmRollover"]},{"name":"SOURCE_DATASOURCE"},{"name":"DEST_DATASOURCE"}]}; 
						var jso_complexfields = []; 
						 
						jso148277["complexfields"] = jso_complexfields; 
						jso148279["RELATIONS"].push(jso148277); 
					} catch(err) {alert(err);} 
					if(!ncm.customEventsTriggers["155190"]){  
						ncm.customEventsTriggers["155190"] = [];  
					}  
					ncm.customEventsTriggers["155190"].push(148279);
var jso148282 = {"properties":[]};  
    $jq.extend(jso148282,{"simplefields":[{"name":"NAME","value":"Gran Canaria"},{"name":"POLY_COORDS","value":"56,161,4"},{"name":"SHAPE","value":"circle"}]});  
      
    jso148282["RELATIONS"] = [];  
      
          
			  
				 
					try { 
						var jso148280 = {"simplefields":[{"name":"NAME","value":"ROC"},{"name":"DATAID","value":"155187"},{"name":"DESCRIPTION_DATAID","value":"Content - Delegación Gran Canaria (ROC)"},{"name":"EVENTS","value":["ncmRollover"]},{"name":"SOURCE_DATASOURCE"},{"name":"DEST_DATASOURCE"}]}; 
						var jso_complexfields = []; 
						 
						jso148280["complexfields"] = jso_complexfields; 
						jso148282["RELATIONS"].push(jso148280); 
					} catch(err) {alert(err);} 
					if(!ncm.customEventsTriggers["155187"]){  
						ncm.customEventsTriggers["155187"] = [];  
					}  
					ncm.customEventsTriggers["155187"].push(148282);
function hidePopup( rocid ){
        if ( $jq(rocid).data("blocked")==undefined || ! $jq(rocid).data("blocked") ){
                $jq( rocid ).hide("slow");
	        
        }
}
function placePopup( selector, e ){
  /*if ( ( e.clientX + $jq(selector).width() ) > ( window.innerWidth - 100 ) ){*/
      $jq(selector).css("left", e.clientX-document.getElementById("page").offsetLeft-$jq(selector).width()-60+"px");
  /*} else {
      $jq(selector).css("left", e.clientX+10+"px");
  }*/
  /*$jq(selector).css("top", e.clientY+10+"px");*/
  $jq(selector).css("top", e.clientY-$jq(selector).height()+"px");
}
function hidePopup( rocid ){
        if ( $jq(rocid).data("blocked")==undefined || ! $jq(rocid).data("blocked") ){
                $jq( rocid ).hide("slow");
	        
        }
}
function placePopup( selector, e ){
  /*if ( ( e.clientX + $jq(selector).width() ) > ( window.innerWidth - 100 ) ){*/
      $jq(selector).css("left", e.clientX-document.getElementById("page").offsetLeft-$jq(selector).width()-60+"px");
  /*} else {
      $jq(selector).css("left", e.clientX+10+"px");
  }*/
  /*$jq(selector).css("top", e.clientY+10+"px");*/
  $jq(selector).css("top", e.clientY-$jq(selector).height()+"px");
}
function hidePopup( rocid ){
        if ( $jq(rocid).data("blocked")==undefined || ! $jq(rocid).data("blocked") ){
                $jq( rocid ).hide("slow");
	        
        }
}
function placePopup( selector, e ){
  /*if ( ( e.clientX + $jq(selector).width() ) > ( window.innerWidth - 100 ) ){*/
      $jq(selector).css("left", e.clientX-document.getElementById("page").offsetLeft-$jq(selector).width()-60+"px");
  /*} else {
      $jq(selector).css("left", e.clientX+10+"px");
  }*/
  /*$jq(selector).css("top", e.clientY+10+"px");*/
  $jq(selector).css("top", e.clientY-$jq(selector).height()+"px");
}
function hidePopup( rocid ){
        if ( $jq(rocid).data("blocked")==undefined || ! $jq(rocid).data("blocked") ){
                $jq( rocid ).hide("slow");
	        
        }
}
function placePopup( selector, e ){
  /*if ( ( e.clientX + $jq(selector).width() ) > ( window.innerWidth - 100 ) ){*/
      $jq(selector).css("left", e.clientX-document.getElementById("page").offsetLeft-$jq(selector).width()-60+"px");
  /*} else {
      $jq(selector).css("left", e.clientX+10+"px");
  }*/
  /*$jq(selector).css("top", e.clientY+10+"px");*/
  $jq(selector).css("top", e.clientY-$jq(selector).height()+"px");
}
function hidePopup( rocid ){
        if ( $jq(rocid).data("blocked")==undefined || ! $jq(rocid).data("blocked") ){
                $jq( rocid ).hide("slow");
	        
        }
}
function placePopup( selector, e ){
  /*if ( ( e.clientX + $jq(selector).width() ) > ( window.innerWidth - 100 ) ){*/
      $jq(selector).css("left", e.clientX-document.getElementById("page").offsetLeft-$jq(selector).width()-60+"px");
  /*} else {
      $jq(selector).css("left", e.clientX+10+"px");
  }*/
  /*$jq(selector).css("top", e.clientY+10+"px");*/
  $jq(selector).css("top", e.clientY-$jq(selector).height()+"px");
}
var jso273189 = {"simplefields":[{"name":"SITE","value":"www.archiauto.com"}],"datatype":"GOOGLE_SITE_SEARCH","dataid":273189}; 
       
    jso273189["RELATIONS"] = [];   
       
	     
		   
		      
			  try {  
				var jso273195 = {"simplefields":[]};  
				var jso_cf = [];  
				  
				jso273195["complexfields"] = jso_cf;  
				jso273189["RELATIONS"].push(jso273195);  
			  } catch(err) {alert(err);}  
			  if(!ncm.customEventsTriggers["273191"]){   
				ncm.customEventsTriggers["273191"] = [];   
			  }   
			  ncm.customEventsTriggers["273191"].push(273189);
var googleSiteSearchInitialized = false;  
    var searchControl = null;   
    function cseLoaded() {     
	  searchControl = new google.search.SearchControl();   
	  var siteSearch = new google.search.WebSearch();   
	  siteSearch.setSiteRestriction("www.archiauto.com");   
	  var options = new google.search.SearcherOptions();   
	  options.setExpandMode(google.search.SearchControl.EXPAND_MODE_OPEN);   
	  searchControl.addSearcher(siteSearch,options);   
	  var drawOptions = new google.search.DrawOptions();   
	  drawOptions.setDrawMode( google.search.SearchControl.DRAW_MODE_LINEAR );  
	  var cse_helper = $jq(ncm.concat("<","div id='cse_helper'",">","<","\/div",">"));  
	  drawOptions.setSearchFormRoot(cse_helper[0]);  
	  searchControl.draw(document.getElementById("gsearch-results"),drawOptions);   
	  searchControl.execute(document.getElementById('fake-gsc-input').value);   
	  googleSiteSearchInitialized = true;   
    }
function hidePopup( rocid ){
        if ( $jq(rocid).data("blocked")==undefined || ! $jq(rocid).data("blocked") ){
                $jq( rocid ).hide("slow");
	        $jq("#page-disabling-mask").hide();
        }
}
function placePopup( selector, e ){
  /*if ( ( e.clientX + $jq(selector).width() ) > ( window.innerWidth - 100 ) ){*/
      $jq(selector).css("left", e.clientX-$jq(selector).width()-60+"px");
  /*} else {
      $jq(selector).css("left", e.clientX+10+"px");
  }*/
  /*$jq(selector).css("top", e.clientY+10+"px");*/
  $jq(selector).css("top", e.clientY-$jq(selector).height()-8+"px");
}
var jso56315 = {"properties":[{"name":"css_panel","value":"lib/jquery-login-panel/css/loginpanel.css"},{"name":"js_panel","value":"lib/jquery-login-panel/js/loginpanel.js"},{"name":"js_png_fix","value":"lib/jquery-login-panel/js/pngfix/supersleight-min.js"},{"name":"jsp_panel","value":"lib/jquery-login-panel/jsp/loginpanel.jsp"},{"name":"lang_text_default","value":"Bienvenido visitante!"},{"name":"lang_login_register"},{"name":"lang_close","value":"Cerrar"},{"name":"lang_close_session","value":"Cerrar sesión"},{"name":"lang_login_title","value":"Entrada de Usuario"},{"name":"lang_username","value":"Usuario"},{"name":"lang_password","value":"Contraseña"},{"name":"lang_remember","value":"Recordarme"},{"name":"lang_lost_password","value":"¿Olvidaste su contraseña?"},{"name":"lang_login","value":"Entrar"},{"name":"lang_username_empty","value":"Tiene que introducor el nombre de usuario"},{"name":"lang_password_empty","value":"Tiene que introducir su contraseña"},{"name":"lang_not_active","value":"Su cuenta de usuario no está activada"},{"name":"lang_not_found","value":"Usuario con este nombre o contraseña no existe"},{"name":"lang_welcome","value":"Bienvenido"},{"name":"lang_error_close_session","value":"No puedo cerrar la sesión de usuario"},{"name":"lang_forgot_title","value":"Olvidé mi contraseña"},{"name":"lang_mail","value":"Email"},{"name":"lang_send","value":"Enviar"},{"name":"lang_return","value":"Volver"},{"name":"lang_project_title","value":"BaseProject"},{"name":"lang_not_send","value":"No puedo enviar el correo con su contraseña nueva"},{"name":"lang_send_ok","value":"Hemos enviado el correo con su nueva contraseña a su email"},{"name":"lang_mail_no_user","value":"Usuario con este email no ha sido encontrado"}]};  
    $jq.extend(jso56315,{"simplefields":[{"name":"NAME","value":"Panel de Login"},{"name":"DATASOURCE1","value":"82"},{"name":"DATASOURCE2","value":"69"},{"name":"DATASOURCE3"},{"name":"EMAIL_TITLE"},{"name":"EMAIL_SUBJECT"},{"name":"EMAIL_TEXT"}]});  
      
    jso56315["RELATIONS"] = [];
$jq(function(){  
	      var options = {   
    datatype: "LOGIN_PANEL",   
    language: "ES",   
    jsp_utils: "components/components-utils.jsp",   
    pageUrl: "transit_kombi.jsp",   
    channel: "DEFAULT",   
    inPreview: false,   
    issueId: 3,  
    skin: "func_init_properties",  
    json: jso56315   
};   
if(window["NcmLoginPanel"]){   
    NcmLoginPanel.initProperties(options);   
}  
	  });
function hidePopup( rocid ){
        if ( $jq(rocid).data("blocked")==undefined || ! $jq(rocid).data("blocked") ){
                $jq( rocid ).hide("slow");
	        $jq("#page-disabling-mask").hide();
        }
}
function placePopup( selector, e ){
  /*if ( ( e.clientX + $jq(selector).width() ) > ( window.innerWidth - 100 ) ){*/
      $jq(selector).css("left", e.clientX-$jq(selector).width()-60+"px");
  /*} else {
      $jq(selector).css("left", e.clientX+10+"px");
  }*/
  /*$jq(selector).css("top", e.clientY+10+"px");*/
  $jq(selector).css("top", e.clientY-$jq(selector).height()-8+"px");
}
function hidePopup( rocid ){
        if ( $jq(rocid).data("blocked")==undefined || ! $jq(rocid).data("blocked") ){
                $jq( rocid ).hide("slow");
	        $jq("#page-disabling-mask").hide();
        }
}
function placePopup( selector, e ){
  /*if ( ( e.clientX + $jq(selector).width() ) > ( window.innerWidth - 100 ) ){*/
      $jq(selector).css("left", e.clientX-$jq(selector).width()-60+"px");
  /*} else {
      $jq(selector).css("left", e.clientX+10+"px");
  }*/
  /*$jq(selector).css("top", e.clientY+10+"px");*/
  $jq(selector).css("top", e.clientY-$jq(selector).height()-8+"px");
}
var jso182473 = {"properties":[{"name":"css_default","value":""},{"name":"js_default","value":"components/ceva/ncmcevaform.js"},{"name":"js_validation","value":"lib/jquery-validate/jquery.validate.js"},{"name":"js_additional_methods","value":"lib/jquery-validate/additional-methods.js"},{"name":"js_common_validators","value":"components/ceva/validation/validators.js"},{"name":"lang_required_field","value":"Campo obligatorio"},{"name":"lang_unload_message","value":"Los cambios no se guardarán"},{"name":"lang_success","value":"Gracias por rellenar este formulario.  Nos pondremos en contacto con usted lo antes posible para ofrecerle la prueba de conducción."},{"name":"lang_error","value":"Lo sentimos. En este momento no podemos enviar su pedido. Intentalo más tarde."}]};  
    $jq.extend(jso182473,{"simplefields":[{"name":"NAME"},{"name":"PARENT_DATASOURCE"},{"name":"DATASOURCE","value":"117"},{"name":"HIDETITLE","value":false},{"name":"READONLY","value":false},{"name":"INPREVIEW","value":false},{"name":"UNLOAD_MESSAGE","value":false},{"name":"AJAX_MODE","value":true}]});  
      
    jso182473["RELATIONS"] = [];
$jq(function(){   
     
 
 
 
var options = {     
    datatype: "FI_FORM",     
    language: "ES",     
    jsp_utils: "components/components-utils.jsp",     
    pageUrl: "transit_kombi.jsp",     
    channel: "DEFAULT",     
    inPreview: false,     
    issueId: 3,     
    skin: "FUNC_JS_INIT_PROPERTIES",   
    pageId: 644,   
    json: jso182473     
};     
if(window["NcmCevaForm"]){   
    if(NcmCevaForm["instances"]==null){  
	  NcmCevaForm.initProperties(options);     
    }  
}   
});
var jso186100 = {"properties":[{"name":"text_select","value":"Todos"},{"name":"default","value":"CAT,ITEM,LIST"},{"name":"default_style","value":"m"},{"name":"default_size","value":"8"},{"name":"field_separator","value":"--"},{"name":"js_default","value":"components/ceva/mask/combo/combo.js"},{"name":"jsp_loadrelated","value":"components/ceva/mask/loadrelated.jsp"},{"name":"jsp_search","value":"components/ceva/mask/loadsearch.jsp"},{"name":"search_name","value":"Buscar"}]};  
    $jq.extend(jso186100,{"simplefields":[{"name":"NAME","value":"Combo"},{"name":"PARENT_DATASOURCE"},{"name":"DATASOURCE"},{"name":"STYLE","value":"l"},{"name":"HIDE_INITIAL_DATA","value":false}]});  
      
    jso186100["RELATIONS"] = [];
var jsoBatch186100 = {selectors: comboSelectors["186100"]};
$jq(function(){   
     
 
 
 
var options = {     
    datatype: "MASK_COMBO",     
    language: "ES",     
    jsp_utils: "components/components-utils.jsp",     
    pageUrl: "transit_kombi.jsp",     
    channel: "DEFAULT",     
    inPreview: false,     
    issueId: 3,     
    skin: "FUNC_JS_INIT_PROPERTIES",   
    pageId: 644,   
    json: jso186100     
};     
if(window["Combo"]){   
    if(Combo["instances"]==null){  
	  Combo.initProperties(options);     
    }  
}   
});
var jso186109 = {"properties":[{"name":"text_select","value":"Todos"},{"name":"default","value":"CAT,ITEM,LIST"},{"name":"default_style","value":"m"},{"name":"default_size","value":"8"},{"name":"field_separator","value":"--"},{"name":"js_default","value":"components/ceva/mask/combo/combo.js"},{"name":"jsp_loadrelated","value":"components/ceva/mask/loadrelated.jsp"},{"name":"jsp_search","value":"components/ceva/mask/loadsearch.jsp"},{"name":"search_name","value":"Buscar"}]};  
    $jq.extend(jso186109,{"simplefields":[{"name":"NAME","value":"Combo"},{"name":"PARENT_DATASOURCE"},{"name":"DATASOURCE"},{"name":"STYLE","value":"l"},{"name":"HIDE_INITIAL_DATA","value":false}]});  
      
    jso186109["RELATIONS"] = [];
var jsoBatch186109 = {selectors: comboSelectors["186109"]};
var jso186112 = {"properties":[{"name":"text_select","value":"Todos"},{"name":"default","value":"CAT,ITEM,LIST"},{"name":"default_style","value":"m"},{"name":"default_size","value":"8"},{"name":"field_separator","value":"--"},{"name":"js_default","value":"components/ceva/mask/combo/combo.js"},{"name":"jsp_loadrelated","value":"components/ceva/mask/loadrelated.jsp"},{"name":"jsp_search","value":"components/ceva/mask/loadsearch.jsp"},{"name":"search_name","value":"Buscar"}]};  
    $jq.extend(jso186112,{"simplefields":[{"name":"NAME","value":"Combo"},{"name":"PARENT_DATASOURCE"},{"name":"DATASOURCE","value":"62"},{"name":"STYLE","value":"l"},{"name":"HIDE_INITIAL_DATA","value":false}]});  
      
    jso186112["RELATIONS"] = [];
var jsoBatch186112 = {selectors: comboSelectors["186112"]};
var jso186279 = {"properties":[{"name":"text_select","value":"Todos"},{"name":"default","value":"CAT,ITEM,LIST"},{"name":"default_style","value":"m"},{"name":"default_size","value":"8"},{"name":"field_separator","value":"--"},{"name":"js_default","value":"components/ceva/mask/combo/combo.js"},{"name":"jsp_loadrelated","value":"components/ceva/mask/loadrelated.jsp"},{"name":"jsp_search","value":"components/ceva/mask/loadsearch.jsp"},{"name":"search_name","value":"Buscar"}]};  
    $jq.extend(jso186279,{"simplefields":[{"name":"NAME","value":"Combo"},{"name":"PARENT_DATASOURCE"},{"name":"DATASOURCE","value":"136"},{"name":"STYLE","value":"l"},{"name":"HIDE_INITIAL_DATA","value":false}]});  
      
    jso186279["RELATIONS"] = [];  
      
          
			  
				 
					try { 
						var jso218756 = {"simplefields":[{"name":"NAME","value":"Afecta a versión"},{"name":"DATAID","value":"186282"},{"name":"DESCRIPTION_DATAID","value":"Content - Quiero probarlo (Bloque de contenido) - Content - [Sin título] (Formulario) - Components - Datos coche (Grupo de campos) - Versión coche - [Sin título] (Propiedades de campo de fuente de los datos) - Mask - Combo (Combo)"},{"name":"EVENTS","value":["ncmValueChange"]},{"name":"SOURCE_DATASOURCE","value":"136"},{"name":"DEST_DATASOURCE","value":"137"}]}; 
						var jso_complexfields = []; 
						 
						jso218756["complexfields"] = jso_complexfields; 
						jso186279["RELATIONS"].push(jso218756); 
					} catch(err) {alert(err);} 
					if(!ncm.customEventsTriggers["186282"]){  
						ncm.customEventsTriggers["186282"] = [];  
					}  
					ncm.customEventsTriggers["186282"].push(186279);
var jsoBatch186279 = {selectors: comboSelectors["186279"]};
var jso186282 = {"properties":[{"name":"text_select","value":"Todos"},{"name":"default","value":"CAT,ITEM,LIST"},{"name":"default_style","value":"m"},{"name":"default_size","value":"8"},{"name":"field_separator","value":"--"},{"name":"js_default","value":"components/ceva/mask/combo/combo.js"},{"name":"jsp_loadrelated","value":"components/ceva/mask/loadrelated.jsp"},{"name":"jsp_search","value":"components/ceva/mask/loadsearch.jsp"},{"name":"search_name","value":"Buscar"}]};  
    $jq.extend(jso186282,{"simplefields":[{"name":"NAME","value":"Combo"},{"name":"PARENT_DATASOURCE","value":"136"},{"name":"DATASOURCE","value":"137"},{"name":"STYLE","value":"l"},{"name":"HIDE_INITIAL_DATA","value":false}]});  
      
    jso186282["RELATIONS"] = [];
var jsoBatch186282 = {selectors: comboSelectors["186282"]};
$jq(function(){   
     
 
    if(window["NcmMediaAlbum"]) {   
        try {NcmMediaAlbum.register(87241,jso87241,jsoBatch87241);} catch(mErr) {}   
    } 
   
});
if(jso87246["RELATIONS"].length>0){ 
	      $jq(function(){ 
		    $jq("#link87246").click(function(e){ 
			  ncm.triggerEvent(ncm.customEvents["ncmValueChange"],["",87246]); 
			  e.preventDefault(); 
			  return false; 
		    }); 
	      }); 
	  }
$jq(function(){ 
	      $jq("#link87247").click( function(){ window.location.href='CATALOGOS/Transit_pasajeros.pdf' } ); 
	  });
$jq(function(){   
     
 
    if(window["NcmMediaAlbum"]) {   
        try {NcmMediaAlbum.register(87264,jso87264,jsoBatch87264);} catch(mErr) {}   
    } 
   
});
$jq(function(){ 
	      $jq("div.illustrated-text a[href^=http://]").attr("target","_blank"); 
	  });
$jq(function(){ 
	      $jq("table.text").attr("align","center");  
	  });
if(jso174540["RELATIONS"].length>0){ 
	      $jq(function(){ 
		    $jq("#link174540").click(function(e){ 
			  ncm.triggerEvent(ncm.customEvents["ncmValueChange"],["",174540]); 
			  e.preventDefault(); 
			  return false; 
		    }); 
	      }); 
	  }
if(jso148270["RELATIONS"].length>0){
      
      
      $jq(function(){ 
	    $jq("#img_area_148270").mouseover(function(e){ 
		  ncm.triggerEvent(ncm.customEvents["ncmRollover"],["", 148270,e ]);
		  e.preventDefault(); 
		  return false; 
	    });
	    $jq("#img_area_148270").mouseout(function(e){ 
		  ncm.triggerEvent(ncm.customEvents["ncmRolloverOut"],["", 148270,e ]);
		  e.preventDefault(); 
		  return false; 
	    });
      });
      
  }
if(jso148273["RELATIONS"].length>0){
      
      
      $jq(function(){ 
	    $jq("#img_area_148273").mouseover(function(e){ 
		  ncm.triggerEvent(ncm.customEvents["ncmRollover"],["", 148273,e ]);
		  e.preventDefault(); 
		  return false; 
	    });
	    $jq("#img_area_148273").mouseout(function(e){ 
		  ncm.triggerEvent(ncm.customEvents["ncmRolloverOut"],["", 148273,e ]);
		  e.preventDefault(); 
		  return false; 
	    });
      });
      
  }
if(jso148276["RELATIONS"].length>0){
      
      
      $jq(function(){ 
	    $jq("#img_area_148276").mouseover(function(e){ 
		  ncm.triggerEvent(ncm.customEvents["ncmRollover"],["", 148276,e ]);
		  e.preventDefault(); 
		  return false; 
	    });
	    $jq("#img_area_148276").mouseout(function(e){ 
		  ncm.triggerEvent(ncm.customEvents["ncmRolloverOut"],["", 148276,e ]);
		  e.preventDefault(); 
		  return false; 
	    });
      });
      
  }
if(jso148279["RELATIONS"].length>0){
      
      
      $jq(function(){ 
	    $jq("#img_area_148279").mouseover(function(e){ 
		  ncm.triggerEvent(ncm.customEvents["ncmRollover"],["", 148279,e ]);
		  e.preventDefault(); 
		  return false; 
	    });
	    $jq("#img_area_148279").mouseout(function(e){ 
		  ncm.triggerEvent(ncm.customEvents["ncmRolloverOut"],["", 148279,e ]);
		  e.preventDefault(); 
		  return false; 
	    });
      });
      
  }
if(jso148282["RELATIONS"].length>0){
      
      
      $jq(function(){ 
	    $jq("#img_area_148282").mouseover(function(e){ 
		  ncm.triggerEvent(ncm.customEvents["ncmRollover"],["", 148282,e ]);
		  e.preventDefault(); 
		  return false; 
	    });
	    $jq("#img_area_148282").mouseout(function(e){ 
		  ncm.triggerEvent(ncm.customEvents["ncmRolloverOut"],["", 148282,e ]);
		  e.preventDefault(); 
		  return false; 
	    });
      });
      
  }
$jq(function(){ 
	      $jq("#roc155186").mouseover( function(e){ 
			$jq(this).data("blocked",true);
		});
	      $jq("#roc155186").mouseout( function(e){ 
			$jq(this).data("blocked",false);
		      setTimeout('hidePopup( "#roc155186" )',500);
		});
		$jq("#roc155186 .floating-roc-close").click( function(e){ 
			$jq(this).parent().parent().hide("slow"); 
			
		}); 
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmValueChange"], 
				"#roc155186", 
				155186, 
				function(eventName,params,e){ 
					 
					placePopup("#roc155186",e); 
				      $jq("#roc155186").show("slow"); 
				}
			);
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmRollover"], 
				"#roc155186", 
				155186, 
				function(eventName,params,e){ 
					 
					placePopup("#roc155186",e); 
				      $jq("#roc155186").show("slow"); 
				}
			);
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmRolloverOut"], 
				"#roc155186", 
				155186, 
				function(eventName,params,e){
					    setTimeout('hidePopup( "#roc155186" )',500);
				}
			)
        });
$jq(function(){ 
	      $jq("#link112869").click( function(){ window.location.href='formulario_cita_previa_im.jsp' } ); 
	  });
$jq(function(){ 
	      $jq("#roc155187").mouseover( function(e){ 
			$jq(this).data("blocked",true);
		});
	      $jq("#roc155187").mouseout( function(e){ 
			$jq(this).data("blocked",false);
		      setTimeout('hidePopup( "#roc155187" )',500);
		});
		$jq("#roc155187 .floating-roc-close").click( function(e){ 
			$jq(this).parent().parent().hide("slow"); 
			
		}); 
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmValueChange"], 
				"#roc155187", 
				155187, 
				function(eventName,params,e){ 
					 
					placePopup("#roc155187",e); 
				      $jq("#roc155187").show("slow"); 
				}
			);
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmRollover"], 
				"#roc155187", 
				155187, 
				function(eventName,params,e){ 
					 
					placePopup("#roc155187",e); 
				      $jq("#roc155187").show("slow"); 
				}
			);
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmRolloverOut"], 
				"#roc155187", 
				155187, 
				function(eventName,params,e){
					    setTimeout('hidePopup( "#roc155187" )',500);
				}
			)
        });
$jq(function(){ 
	      $jq("#link112922").click( function(){ window.location.href='formulario_cita_previa_im.jsp' } ); 
	  });
$jq(function(){ 
	      $jq("#roc155188").mouseover( function(e){ 
			$jq(this).data("blocked",true);
		});
	      $jq("#roc155188").mouseout( function(e){ 
			$jq(this).data("blocked",false);
		      setTimeout('hidePopup( "#roc155188" )',500);
		});
		$jq("#roc155188 .floating-roc-close").click( function(e){ 
			$jq(this).parent().parent().hide("slow"); 
			
		}); 
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmValueChange"], 
				"#roc155188", 
				155188, 
				function(eventName,params,e){ 
					 
					placePopup("#roc155188",e); 
				      $jq("#roc155188").show("slow"); 
				}
			);
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmRollover"], 
				"#roc155188", 
				155188, 
				function(eventName,params,e){ 
					 
					placePopup("#roc155188",e); 
				      $jq("#roc155188").show("slow"); 
				}
			);
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmRolloverOut"], 
				"#roc155188", 
				155188, 
				function(eventName,params,e){
					    setTimeout('hidePopup( "#roc155188" )',500);
				}
			)
        });
$jq(function(){ 
	      $jq("#link112925").click( function(){ window.location.href='formulario_cita_previa_im.jsp' } ); 
	  });
$jq(function(){ 
	      $jq("#roc155189").mouseover( function(e){ 
			$jq(this).data("blocked",true);
		});
	      $jq("#roc155189").mouseout( function(e){ 
			$jq(this).data("blocked",false);
		      setTimeout('hidePopup( "#roc155189" )',500);
		});
		$jq("#roc155189 .floating-roc-close").click( function(e){ 
			$jq(this).parent().parent().hide("slow"); 
			
		}); 
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmValueChange"], 
				"#roc155189", 
				155189, 
				function(eventName,params,e){ 
					 
					placePopup("#roc155189",e); 
				      $jq("#roc155189").show("slow"); 
				}
			);
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmRollover"], 
				"#roc155189", 
				155189, 
				function(eventName,params,e){ 
					 
					placePopup("#roc155189",e); 
				      $jq("#roc155189").show("slow"); 
				}
			);
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmRolloverOut"], 
				"#roc155189", 
				155189, 
				function(eventName,params,e){
					    setTimeout('hidePopup( "#roc155189" )',500);
				}
			)
        });
$jq(function(){ 
	      $jq("#link112928").click( function(){ window.location.href='formulario_cita_previa_im.jsp' } ); 
	  });
$jq(function(){ 
	      $jq("#roc155190").mouseover( function(e){ 
			$jq(this).data("blocked",true);
		});
	      $jq("#roc155190").mouseout( function(e){ 
			$jq(this).data("blocked",false);
		      setTimeout('hidePopup( "#roc155190" )',500);
		});
		$jq("#roc155190 .floating-roc-close").click( function(e){ 
			$jq(this).parent().parent().hide("slow"); 
			
		}); 
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmValueChange"], 
				"#roc155190", 
				155190, 
				function(eventName,params,e){ 
					 
					placePopup("#roc155190",e); 
				      $jq("#roc155190").show("slow"); 
				}
			);
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmRollover"], 
				"#roc155190", 
				155190, 
				function(eventName,params,e){ 
					 
					placePopup("#roc155190",e); 
				      $jq("#roc155190").show("slow"); 
				}
			);
			ncm.bindCustomEventForSelector( 
				ncm.customEvents["ncmRolloverOut"], 
				"#roc155190", 
				155190, 
				function(eventName,params,e){
					    setTimeout('hidePopup( "#roc155190" )',500);
				}
			)
        });
$jq(function(){ 
	      $jq("#link112931").click( function(){ window.location.href='formulario_cita_previa_im.jsp' } ); 
	  });
$jq(function(){ 
	  $jq("#main-menu-item-644").attr("class", "selected");

	  var divPopup=document.getElementById('roc344222');
	  if(divPopup) {
    	 $jq("#page-disabling-mask").show();   
           centerDiv( "#roc344222",714,261 );
           $jq("#roc344222").show();
	  }
    });
$jq(function(){   
	  $jq("div#cse form").submit(function(){   
	      if(window["google"] && window["google"]["search"]){   
		    if(!googleSiteSearchInitialized){   
			  cseLoaded();   
		    } else {  
			  searchControl.execute(document.getElementById('fake-gsc-input').value);  
		    }  
	      } else {   
		    google.load("search","1",{"callback":cseLoaded});   
	      }   
	      ncm.triggerEvent(ncm.customEvents["ncmValueChange"],["",273189]);  
	      return false;   
	  });   
	  $jq("div#cse input#fake-gsc-input").focus(function () {   
	      $jq(this).val("");   
	  });   
    });
$jq(function(){ 
	  $jq("div.form-search input.text-search").focus(function () { 
	      $jq("div.form-search input.text-search").val(""); 
	  }); 
    });
$jq(function(){  
		$jq("#roc273191 .floating-roc-close").click( function(e){  
			$jq(this).closest(".floating-roc").hide("slow"); 

			$jq("#page-disabling-mask").hide();  
		});
                ncm.bindCustomEventForSelector(ncm.customEvents["ncmValueChange"], "#roc273191", 273191, function(e){
			$jq("#page-disabling-mask").show();
			
		        $jq("#roc273191").show("slow"); 
		}); 
                ncm.bindCustomEventForSelector(ncm.customEvents["ncmSuccess"], "#roc273191", 273191, function(e){
		    $jq("#roc273191").hide("slow"); 
		}); 
                ncm.bindCustomEventForSelector(ncm.customEvents["ncmError"], "#roc273191", 273191, function(e){
		    $jq("#roc273191").hide("slow"); 
		}); 
	});
$jq(function(){ 
	      try { NcmLoginPanel.register(56315,jso56315); } catch(mErr){}  
	  });
$jq(function(){  
		$jq("#roc174622 .floating-roc-close").click( function(e){  
			$jq(this).closest(".floating-roc").hide("slow"); 

			$jq("#page-disabling-mask").hide();  
		});
                ncm.bindCustomEventForSelector(ncm.customEvents["ncmValueChange"], "#roc174622", 174622, function(e){
			$jq("#page-disabling-mask").show();
			centerDiv( "#roc174622",500,500);
		        $jq("#roc174622").show("slow"); 
		}); 
                ncm.bindCustomEventForSelector(ncm.customEvents["ncmSuccess"], "#roc174622", 174622, function(e){
		    $jq("#roc174622").hide("slow"); 
		}); 
                ncm.bindCustomEventForSelector(ncm.customEvents["ncmError"], "#roc174622", 174622, function(e){
		    $jq("#roc174622").hide("slow"); 
		}); 
	});
$jq(function(){  
		$jq("#roc217562 .floating-roc-close").click( function(e){  
			$jq(this).closest(".floating-roc").hide("slow"); 

			$jq("#page-disabling-mask").hide();  
		});
                ncm.bindCustomEventForSelector(ncm.customEvents["ncmValueChange"], "#roc217562", 217562, function(e){
			$jq("#page-disabling-mask").show();
			centerDiv( "#roc217562",500,500);
		        $jq("#roc217562").show("slow"); 
		}); 
                ncm.bindCustomEventForSelector(ncm.customEvents["ncmSuccess"], "#roc217562", 217562, function(e){
		    $jq("#roc217562").hide("slow"); 
		}); 
                ncm.bindCustomEventForSelector(ncm.customEvents["ncmError"], "#roc217562", 217562, function(e){
		    $jq("#roc217562").hide("slow"); 
		}); 
	});
$jq(function(){   
     
 
    if(window["NcmCevaForm"]) {   
        try {NcmCevaForm.register(182473,jso182473);} catch(mErr) {}   
    } 
   
});
$jq(function(){ 
    $jq(".skinned_list select").each(function(ind) {
	 $jq(this).closest(".skinned_list").children(".skinned_list_text").text( this.options[this.selectedIndex].text ); 
    }) .change( function(e){
	 $jq(this).closest(".skinned_list").children(".skinned_list_text").text( this.options[this.selectedIndex].text ); 
  }); 
});
$jq(function(){   
     
 
    if (!comboReadOnly["186100"]) { 
 
    if(window["Combo"]) {   
        try {Combo.register(186100,jso186100,jsoBatch186100);} catch(mErr) {}   
    } 
 
    } 
   
});
$jq(function(){   
     
 
    if (!comboReadOnly["186109"]) { 
 
    if(window["Combo"]) {   
        try {Combo.register(186109,jso186109,jsoBatch186109);} catch(mErr) {}   
    } 
 
    } 
   
});
$jq(function(){   
     
 
    if (!comboReadOnly["186112"]) { 
 
    if(window["Combo"]) {   
        try {Combo.register(186112,jso186112,jsoBatch186112);} catch(mErr) {}   
    } 
 
    } 
   
});
$jq(function(){   
     
 
    if (!comboReadOnly["186279"]) { 
 
    if(window["Combo"]) {   
        try {Combo.register(186279,jso186279,jsoBatch186279);} catch(mErr) {}   
    } 
 
    } 
   
});
$jq(function(){   
     
 
    if (!comboReadOnly["186282"]) { 
 
    if(window["Combo"]) {   
        try {Combo.register(186282,jso186282,jsoBatch186282);} catch(mErr) {}   
    } 
 
    } 
   
});
$jq(function(){ 
	  if(window["NcmMediaAlbum"]){ 
	      try { 
		    NcmMediaAlbum.get(87241).previewVerticalAlign(); 
	      } catch(mErr){} 
	  } 
    });
$jq(function(){ 
	  if(window["NcmMediaAlbum"]){ 
	      try { 
		    NcmMediaAlbum.get(87264).previewVerticalAlign(); 
	      } catch(mErr){} 
	  } 
    });
try {  
	      $jq(function() {    
  	        var c = Combo.getRegistered(186100);  
  	        if (c!=null) c.initMaskEvents();    
	      });    
        } catch(mErr) {}
try {  
	      $jq(function() {    
  	        var c = Combo.getRegistered(186109);  
  	        if (c!=null) c.initMaskEvents();    
	      });    
        } catch(mErr) {}
try {  
	      $jq(function() {    
  	        var c = Combo.getRegistered(186112);  
  	        if (c!=null) c.initMaskEvents();    
	      });    
        } catch(mErr) {}
try {  
	      $jq(function() {    
  	        var c = Combo.getRegistered(186279);  
  	        if (c!=null) c.initMaskEvents();    
	      });    
        } catch(mErr) {}
try {  
	      $jq(function() {    
  	        var c = Combo.getRegistered(186282);  
  	        if (c!=null) c.initMaskEvents();    
	      });    
        } catch(mErr) {}

