(function($){ $.fn.extend({   customStyle : function(options) {    if(!$.browser.msie || ($.browser.msie&&$.browser.version>6)){    return this.each(function() {          var currentSelected = options;      $(this).after('<span class="customStyleSelectBox"><span class="customStyleSelectBoxInner">'+currentSelected+'</span></span>').css({position:'absolute', opacity:0,fontSize:$(this).next().css('font-size')});      var selectBoxSpan = $(this).next();      //var selectBoxWidth = parseInt($(this).width()) - parseInt(selectBoxSpan.css('padding-left')) -parseInt(selectBoxSpan.css('padding-right'));      var selectBoxWidth = 104;      var selectBoxSpanInner = selectBoxSpan.find(':first-child');      selectBoxSpan.css({display:'inline-block'});      selectBoxSpanInner.css({width:selectBoxWidth, display:'inline-block'});      var selectBoxHeight = parseInt(selectBoxSpan.height()) + parseInt(selectBoxSpan.css('padding-top')) + parseInt(selectBoxSpan.css('padding-bottom'));          });    }  } });})(jQuery);;
// $Id$(function ($) {  Drupal.behaviors.monocomplex = {    attach: function(context) {      /* Search Box */      var search = $('.region-sidebar-first #edit-search-block-form--2');      search.data('default', 'search');      search.val('search');      search.focus(function(){        if(!$(this).hasClass('fill')){          $(this).val('').addClass('fill');        }      }).blur(function(){        if($(this).val().length==0){          $(this).val($(this).data('default')).removeClass('fill');        }      });            /* ERROR MESSAGE */      var message = $('#page').find('.messages');      message.bind('click', function(){        $(this).remove();      });            $('#content .views-field-field-image,#content .views-field-field-image-rotator').each(function(){        $(this).hover(function(){          $(this).stop().animate({            'opacity': '0.4'          }, 300);        }, function(){          $(this).stop().animate({            'opacity': '1'          }, 300);        });      });            /* Body Image Caption */      $('#content .field-name-body').find('img').each(function(){        var caption = $(this).attr('alt');        if($(this).next().hasClass('image-caption')){          /* Do nothing */        }else{          $(this).after('<div class="image-caption">'+caption+'</div>');          var c = $(this).next();          var h = (c.height()*-1)-6;          c.css({'marginTop':h, 'marginBottom':'12px'});        };      });            /* Navigation */      $('#navigation li a').each(function(){        $(this).click(function(){          $('#navigation li a').removeClass().css({color: '#999'});          $(this).addClass('active').stop().animate({            color: '#FFFFFF'          },400);        });      });            /* Secondaly Navigation */      $('#about-frame li').bind('click', function(){        var target = $(this).parent().parent();        var content = target.find('.about-content');        target.stop().animate({          'width': '480px',          'height': content.height()+40        },800, function(){          content.animate({'opacity':'1'}, 200);          target.find('.close').css({'display':'block'});        });      });      $('#about-frame .close').bind('click', function(){        var target = $(this).parent().parent();        target.find('.close').css({'display':'none'});        target.find('.about-content').animate({'opacity':'0'}, 200, function(){          target.stop().animate({            'width': '36px',            'height': '20px'          },800);        });      });            /* Top Page */      if($('body').hasClass('front')){      }            /* Interview */      if($('body').hasClass('node-type-interview')){        /* Interview */        var padding = 24*$('.field-name-field-abbreviation .field-item').length;        var evenWidth = $('#content .field-name-field-abbreviation .field-items .even').width();        var oddWidth = $('#content .field-name-field-abbreviation .field-items .odd').width();        var rightBorderWidth = $('#content .border-right').width();        var initialWidth = evenWidth+oddWidth+padding+rightBorderWidth;        $('#content .border-left').css({'width':679-initialWidth+'px'});                var videoCredit = $('.content-info .video-credit');        if(videoCredit.children().length==1){          videoCredit.remove();        }                var creditHeight = $('.content-info').height()+14;        $('.content-left').css({'marginBottom':-creditHeight});      }            /* Topix */      if($('body').hasClass('node-type-topix')){                var contentHeight = $('#content .twocol-right').height();        var nImg = $('#content .twocol-left').find('img');        nImg.load(function(){          var imgHeight = $('#content .twocol-left').height();          if(contentHeight<imgHeight){            $('#content .content-info').css({'marginTop':(imgHeight+27)-contentHeight});          }        });                /* Topix Archives Titles */        $('#content .region-content-list-0').find('.category-title').html('related');        $('#content .region-content-list-1').find('.category-title').html('art');        $('#content .region-content-list-2').find('.category-title').html('design');        $('#content .region-content-list-3').find('.category-title').html('fashion');        $('#content .region-content-list-4').find('.category-title').html('motion');        $('#content .region-content-list-5').find('.category-title').html('casa');        $('#content .region-content-list-6').find('.category-title').html('tech');        $('#content .region-content-list-7').find('.category-title').html('misc');      }      /* Event */      if($('body').hasClass('node-type-event')){        var contentHeight = $('#content .twocol-right').height();        var nImg = $('#content .twocol-left').find('img');        nImg.load(function(){          var imgHeight = $('#content .twocol-left').height();          if(contentHeight<imgHeight){            $('#content .content-info').css({'marginTop':(imgHeight+12)-contentHeight});          }        });                /* Event Date Format */        var from = $('#scrollbar1').find('.date-display-start').text();        var to = $('#scrollbar1').find('.date-display-end').text();        $('#scrollbar1').find('.field-name-field-event-date .field-item').remove();        $('#scrollbar1').find('.field-name-field-event-date .field-items').text(from+' – '+to);      }            /* Archive Forms */1      if($('body').hasClass('page-archive')){        if($('.form-item-tid').children().length == 1){          $('#edit-tid').customStyle('Category');          $('#edit-type-1').customStyle('Content type');        }      }    }    }  })(jQuery);;

