/*=============================================================================
  Author:			      C2 mediaproduction
  Author Mail:      c.rolle@c-two.de
  Author URL:		    http://www.c-two.de/
  Description:      Default JS functions
  ===========================================================================*/

// load all required JS files
head.js(
	/*{mootools: "http://ajax.googleapis.com/ajax/libs/mootools/1.2.5/mootools-yui-compressed.js"},
	{mootoolsmore: "plugins/mootools/mootools-more.js?1.2.5.1"},*/
  {jquery: "http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"},
  /*{livejs: "tl_files/default/js/live.js"},*/
  /*{tabs: "tl_files/default/css/yaml/add-ons/accessible-tabs/jquery.tabs.js"},*/
  /*{syncheight: "tl_files/default/css/yaml/add-ons/syncheight/jquery.syncheight.js"},*/

  /*{cycle: "tl_files/default/js/jquery.cycle.lite.min.js"},*/
  /*{dropmenu: "tl_files/default/js/jquery.dropmenu-1.1.4.js"},*/
  {colorbox: "tl_files/default/js/jquery.colorbox-min.js"}
);

// enable IE to print HTML5-Sites
if (head.browser.ie)  {
   head.js("http://www.iecss.com/print-protector/javascript/iepp.1-6-2.min.js");
}

head.ready(function() {
 
  // set jquery to cause no conflicts with parallel running mootools
  $.noConflict();

  // remap jQuery to $
  (function($){

    $(document).ready(function(){ 

      // Setup Colorbox for links with rel=lightbox
      if($("a[rel='lightbox']").length) {
        $("a[rel='lightbox']").colorbox({
      	  scalePhotos: true,
      	  maxWidth: "800px",
      	  maxHeight: "600px",
      	  title: " "
      	});
    	}

        $(".quicksearch #ctrl_17").each(function(){
            var wert = $(this).val();
            
            $(this).focusin(function(){
                if ($(this).val() == wert) { $(this).val(""); }
            }).focusout(function(){
                if ($.trim($(this).val()) == "") { $(this).val(wert); }
            });
        }); 
        
        $(function() {
            if (window.PIE) {
                $('#main .page').each(function() {
                    PIE.attach(this);
                });
            }
        });  	  

    });

  })(window.jQuery);
 

});





