/* dolcebita.js */
jQuery(document).ready(function($) {  
  // enlaces externos
  $("a[href*='http://']:not([href*='dolcebita.com'])").attr("target","_blank");
  // imagenes
  $("#wrapper .content img").not("#socialmenu img").not("#wp-timeline-archive img").lazyload({
    effect:"fadeIn",
    placeholder: "http://www.dolcebita.com/wp-content/themes/constant/img/grey.gif"
  });
  // imprimir  
  $('#printer').click(function(e){
    e.preventDefault();
    var pid = $(this).attr('href');
    window.open('http://www.dolcebita.com/wp-content/themes/constant/print.php?id='+pid,document.title,'width=650,height=440,scrollbars=yes');
  });  
  // browseradvise
  $('#browseradvise .close').click(function(e){
    e.preventDefault();
    $('#browseradvise').hide();
  }); 
  // buscador
  $('#cse-search-box .default-value').each(function() {
    var default_value = this.value;
    $(this).css('color', '#999');
    $(this).focus(function() {
      if(this.value == default_value) {
        this.value = '';
        $(this).css('color', '#000');
      };
    });
    $(this).blur(function() {
      if(this.value == '') {
        $(this).css('color', '#999');
        this.value = default_value;
      };
    });
  });
  
});