$(document).ready(function(){
    //<![CDATA[

    if(!$.browser.msie){
      $('<link rel="shortcut icon" type="image/gif" href="/images/favicon.gif" />').appendTo("html head");
    }

  	/*$("a.view").fancybox({
      'hideOnContentClick'			: false,
      'overlayShow'     : true,
  		'zoomSpeedIn'     : 500,
  		'zoomSpeedOut'    : 500,
  		'easingIn'        : 'easeOutBack',
  		'easingOut'       : 'easeInBack'
  	});*/
  	/************** rounded input fields START **************/
			  $(".input_field").focus(function(){
			    $(this).parent().parent().parent().addClass("light_area");
			  });
			  $(".input_field").blur(function(){
			    $(this).parent().parent().parent().removeClass("light_area");
			  });
  	/*************** rounded input fields END ***************/

  	/************** sIFR START **************/
/*
    var cooper = {
      src: '/modules/fonts/cooper3.swf'
    };
    sIFR.activate(cooper);
    sIFR.replace(cooper, {
      selector: 'h1.beautify'
      ,wmode: 'transparent'
      ,'fontname': 'cooper'
      ,css: [
        '.sIFR-root { color:#ffffff }'
        ,'.sIFR-root a { color:#ffffff; text-decoration:none;}'
        ,'.sIFR-root a:hover { color:#ffffff; text-decoration:none;}'
      ]
    });
    sIFR.replace(cooper, {
      selector: 'h1.bg'
      ,wmode: 'transparent'
      ,'fontname': 'cooper'
      ,css: [
        '.sIFR-root { color:#ffffff }'
        ,'.sIFR-root a { color:#ffffff; text-decoration:none;}'
        ,'.sIFR-root a:hover { color:#ffffff; text-decoration:none;}'
      ]
    });
    sIFR.replace(cooper, {
      selector: 'h1.big_home_title'
      ,wmode: 'transparent'
      ,'fontname': 'cooper'
      ,css: [
        '.sIFR-root { color:#ffffff; }'
      ]
    });
    sIFR.replace(cooper, {
      selector: 'h2'
      ,wmode: 'transparent'
      ,'fontname': 'cooper'
      ,css: [
        '.sIFR-root { color:#ffffff; }'
        ,'.sIFR-root a { color:#ffffff; text-decoration:none;}'
        ,'.sIFR-root a:hover { color:#ffffff; text-decoration:none;}'
      ]
    });
*/
  	/************** sIFR END **************/

  	/************** star rating START **************/
  	$("#star_rating a").click(function(){
  		$.get('/ajax/', { action:"vote_portfolio", portfolio_id:portfolio_id, vote_nr:$(this).text() }, function(data){
  		  var tmp = data.split('@');
  			$("#star_rating .current-rating").css({'width':tmp[0]+'%'});
  			$(".rating_average").html(tmp[1]);
  			$(".message").slideDown().animate({opacity: 1}, 4444).slideUp('slow');
  		});
  		return false;
  	})
  	/************** star rating END **************/
     //]]>
});
