// css@js 
document.documentElement.className = 'js';


/*
$(document).ready(function(){
    // @ all pages
     
    // init main menu
    $("#nav").superfish();
    
    // facebox 
    // $('a[rel*=facebox]').facebox()
   
});
*//*
// hide labels.labelAsValue and set their texts to the inputs they are for 
this.label2value = function(){	

	var inactive   = "input-inactive";
	var active     = "input-active";
	var focused    = "input-focused";
    
	$("label.labelAsValue").each(function(){		
		obj = document.getElementById($(this).attr("for"));
		if(($(obj).attr("type") == "text") || ($(obj).attr("type") == "password") || (obj.tagName.toLowerCase() == "textarea")){			
			$(obj).addClass(inactive);			
			var text = $(this).text().replace(/\s+$/,'').replace(/^\s+/,'');
			$(this).css("display","none");			
			$(obj).val(text);
			$(obj).focus(function(){	
				$(this).addClass(focused);
				$(this).removeClass(inactive);
				$(this).removeClass(active);								  
				if($(this).val() == text) $(this).val("");
			});	
			$(obj).blur(function(){	
				$(this).removeClass(focused);													 
				if($(this).val() == "") {
					$(this).val(text);
					$(this).addClass(inactive);
				} else {
					$(this).addClass(active);		
				};				
			});				
		};	
	});
};

*/
// show only one language at a time in profile about 
$.fn.switchToLanguage = function() {
	return this.each(function(e){
		$(this).click( function(){
            targetClass = $(this).attr("href").substring(1,255);
			document.site_lang = targetClass;
			
            $('#profile-about .more-block').hide()
            $('#profile-about').find('.more-block-'+targetClass).show()
            $('#profile-about-more').show()
        });
	});
};



/* hoverClass
 * add support for ie:hover
 * usage : $('p').hoverClass('myClassName')
 */
$.fn.hoverClass = function(c) {
	return this.each(function(){
		$(this).hover( 
			function() { $(this).addClass(c); },
			function() { $(this).removeClass(c); }
		);
	});
};

/* bgIframe 
 * ! Copyright (c) 2008 Brandon Aaron (http://brandonaaron.net)
 * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
 * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
 *
 * Version 2.1.2-pre
 */
/*
$.fn.bgIframe = $.fn.bgiframe = function(s) {
  // This is only for IE6
  if ( $.browser.msie && /6.0/.test(navigator.userAgent) ) {
    s = $.extend({
      top : 'auto', // auto == .currentStyle.borderTopWidth
      left : 'auto', // auto == .currentStyle.borderLeftWidth
      width : 'auto', // auto == offsetWidth
      height : 'auto', // auto == offsetHeight
      opacity : true,
      src : 'javascript:false;'
    }, s || {});
    var prop = function(n){return n&&n.constructor==Number?n+'px':n;},
     html = '<iframe class="bgiframe"frameborder="0"tabindex="-1"src="'+s.src+'"'+
     'style="display:block;position:absolute;z-index:-1;'+
       (s.opacity !== false?'filter:Alpha(Opacity=\'0\');':'')+
           'top:'+(s.top=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||0)*-1)+\'px\')':prop(s.top))+';'+
           'left:'+(s.left=='auto'?'expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||0)*-1)+\'px\')':prop(s.left))+';'+
           'width:'+(s.width=='auto'?'expression(this.parentNode.offsetWidth+\'px\')':prop(s.width))+';'+
           'height:'+(s.height=='auto'?'expression(this.parentNode.offsetHeight+\'px\')':prop(s.height))+';'+
          '"/>';
    return this.each(function() {
      if ( $('> iframe.bgiframe', this).length == 0 )
        this.insertBefore( document.createElement(html), this.firstChild );
    });
  }
  return this;
};
*/
