﻿/// <reference path="jquery-1.3.2-vsdoc2.js" />

function formatText(index, panel) {
  return index + "";
}

//CMS class

function cms(){
  this.Search = function(q){
    if (q.length > 2) {
      var qs = "?q=" + encodeURIComponent(q);
      window.location.href = "/hr/trazi/" + qs;
      }
  }
}

var $CMS = new cms();


$(function () {






  //Cufon.replace('#menu A, H3', { hover: true });

  $('#search INPUT').focus(function () {
    $(this).val('');

  });

  $("#inputSearchTop,#inputSearchBottom").keypress(function (e) {
    if (e.which == 13) {
      $CMS.Search($(this).val());
    }
  });

  $("#search-btn,.search-btn,.search").click(function (e) {
    $CMS.Search($(this).parent().find("INPUT").eq(0).val());
    return false;
  });

  try {
    //news filter replace dropdowns
    $('SELECT').selectbox();

    $('.ddl').change(function () {
      if ($(this).val() != "0") {
        window.location.href = $(this).val();
      }
    });



    $("#googlemaps").fancybox({
      'width': '80%',
      'height': '80%',
      'autoScale': false,
      'transitionIn': 'none',
      'transitionOut': 'none',
      'type': 'iframe'
    
    });



  } catch (err) { }

  $("#vr > #vr-box").hide();
  $("#vr > A").click(function (e) {
    $("#vr > #vr-box").toggle();
    return false;
  });

});
