<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html expr:dir='data:blog.languageDirection' xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<b:include data='blog' name='all-head-content'/>
<b:if cond='data:blog.pageType == "index"'>
<title><data:blog.pageTitle/></title>
<b:else/>
<title><data:blog.pageName/> ~ <data:blog.title/></title>
</b:if>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,800,300' rel='stylesheet' type='text/css'/>
<!--[if lt IE 9]>
<script type='text/javascript'>
//<![CDATA[
// html5shiv MIT @rem remysharp.com/html5-enabling-script
// iepp v1.6.2 MIT @jon_neal iecss.com/print-protector
/*@cc_on(function(a,b){function r(a){var b=-1;while(++b<f)a.createElement(e[b])}if(!(!window.attachEvent||!b.createStyleSheet||!function(){var a=document.createElement("div");a.innerHTML="<elem></elem>";return a.childNodes.length!==1}())){a.iepp=a.iepp||{};var c=a.iepp,d=c.html5elements||"abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",e=d.split("|"),f=e.length,g=new RegExp("(^|\\s)("+d+")","gi"),h=new RegExp("<(/*)("+d+")","gi"),i=/^\s*[\{\}]\s*$/,j=new RegExp("(^|[^\\n]*?\\s)("+d+")([^\\n]*)({[\\n\\w\\W]*?})","gi"),k=b.createDocumentFragment(),l=b.documentElement,m=l.firstChild,n=b.createElement("body"),o=b.createElement("style"),p=/print|all/,q;c.getCSS=function(a,b){if(a+""===undefined)return"";var d=-1,e=a.length,f,g=[];while(++d<e){f=a[d];if(f.disabled)continue;b=f.media||b,p.test(b)&&g.push(c.getCSS(f.imports,b),f.cssText),b="all"}return g.join("")},c.parseCSS=function(a){var b=[],c;while((c=j.exec(a))!=null)b.push(((i.exec(c[1])?"\n":c[1])+c[2]+c[3]).replace(g,"$1.iepp_$2")+c[4]);return b.join("\n")},c.writeHTML=function(){var a=-1;q=q||b.body;while(++a<f){var c=b.getElementsByTagName(e[a]),d=c.length,g=-1;while(++g<d)c[g].className.indexOf("iepp_")<0&&(c[g].className+=" iepp_"+e[a])}k.appendChild(q),l.appendChild(n),n.className=q.className,n.id=q.id,n.innerHTML=q.innerHTML.replace(h,"<$1font")},c._beforePrint=function(){o.styleSheet.cssText=c.parseCSS(c.getCSS(b.styleSheets,"all")),c.writeHTML()},c.restoreHTML=function(){n.innerHTML="",l.removeChild(n),l.appendChild(q)},c._afterPrint=function(){c.restoreHTML(),o.styleSheet.cssText=""},r(b),r(k);if(c.disablePP)return;m.insertBefore(o,m.firstChild),o.media="print",o.className="iepp-printshim",a.attachEvent("onbeforeprint",c._beforePrint),a.attachEvent("onafterprint",c._afterPrint)}})(this,document)@*/
//]]>
</script>
<![endif]-->
<b:skin><![CDATA[/*
-----------------------------------------------
Template Name : Valor
Author : NewBloggerThemes.com
Author URL : http://newbloggerthemes.com/
Theme URL : http://newbloggerthemes.com/valor-blogger-template/
Created Date : Tuesday, October 4, 2012
License : This template is free for both personal and commercial use, But to satisfy the 'attribution' clause of the license, you are required to keep the footer links intact which provides due credit to its authors.For more information about this license, please use this link :http://creativecommons.org/licenses/by/3.0/
----------------------------------------------- */
body#layout ul{list-style-type:none;list-style:none}
body#layout ul li{list-style-type:none;list-style:none}
body#layout #content {width:600px;}
body#layout #nbtfeature {display:none;}
body#layout #videoslide {display:none;}
/* Variable definitions
====================
*/
/* Use this with templates/template-twocol.html */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
border: 0;
font-style: inherit;
font-weight: inherit;
margin: 0;
outline: 0;
padding: 0;
vertical-align: baseline;
}
:focus {
/* remember to define focus styles! */
outline: 0;
}
ol, ul {
list-style: none;
}
table {
/* tables still need 'cellspacing="0"' in the markup */
border-collapse: separate;
border-spacing: 0;
}
caption, th, td {
font-weight: normal;
text-align: left;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: "";
}
blockquote, q {
quotes: "" "";
}
a img {
border: 0;
}
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
/* BASIC */
body {
font-family: Open Sans,Arial,Century gothic, sans-serif;
color: #555;
font-size: 13px;
font-weight: 300;
background-image: url(http://1.bp.blogspot.com/-fW8OquHNB4c/UQhGc8K08EI/AAAAAAAABAo/xAtgZ7OQIJM/s000/background.jpg);
background-repeat: repeat-x;
background-position: top center;
background-attachment: fixed;
background-color: #eee;
}
img {
border: 0;
margin: 0;
}
a {
color: #3C95D5;
text-decoration: none;
outline: none;
}
a:hover {
color: #000;
text-decoration: none;
}
blockquote {
color: #59666f;
font-style: italic;
font-family: Georgia;
padding: 10px;
}
.clear {
clear: both;
}
table {
border-collapse: collapse;
border-spacing: 0;
border: 1px solid #fff;
margin: 10px 0;
}
table td,table th {
text-align: left;
border: 1px solid #fff;
padding: .4em .8em;
}
table th {
background: #ddd;
color: #999;
text-transform: uppercase;
font-weight: 400;
border: 1px solid #fff;
}
table td {
border: 1px solid #fff;
background: #eee;
color: #555;
}
table tr.even td {
background: #eee;
border: none;
}
table tr:hover td {
background: #FFF9DF;
}
img.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 10px;
background: #eee;
padding: 5px;
}
img.alignnone {
display: inline;
background: #eee;
margin: 0 0 10px;
padding: 5px;
}
img.alignright {
display: inline;
background: #eee;
margin: 5px 0 10px 10px;
padding: 5px;
}
img.alignleft {
display: inline;
background: #eee;
margin: 5px 15px 10px 0;
padding: 5px;
}
.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
margin-bottom: 10px;
}
.alignright {
float: right;
margin: 0 0 10px 10px;
}
.alignleft {
float: left;
margin: 10px 15px 10px 0;
}
.wp-caption {
text-align: center;
background: #eee;
margin: 10px;
padding: 4px 0 5px;
}
.wp-caption img {
border: 0;
margin: 0 0 5px;
padding: 0;
}
.wp-caption p.wp-caption-text {
font-size: 11px;
font-weight: 400;
line-height: 12px;
color: #444;
margin: 0;
padding: 0;
}
.clearfix:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.clearfix {
display: inline-block;
}
html[xmlns] .clearfix {
display: block;
}
* html .clearfix {
height: 1%;
}
h1,
h2,
h3,
h4,
h5,
h6 {
font-weight: 700;
padding: 0;
}
/* #Forms
================================================== */
form {
margin-bottom: 20px;
}
fieldset {
margin-bottom: 20px;
}
input[type="text"],
input[type="password"],
input[type="email"],
textarea,
select {
border: 1px solid #ccc;
padding: 6px 4px;
outline: none;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
border-radius: 2px;
font: 13px "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
color: #777;
margin: 0;
width: 210px;
max-width: 100%;
display: block;
margin-bottom: 20px;
background: #fff;
}
select {
padding: 0;
}
textarea {
min-height: 60px;
}
label,
legend {
display: block;
font-weight: bold;
font-size: 13px;
}
select {
width: 220px;
}
input[type="checkbox"] {
display: inline;
}
label span,
legend span {
font-weight: normal;
font-size: 13px;
color: #444;
}
/* OUTER */
#wrapper {
margin: 50px auto;
background: #fff;
width: 1000px;
}
#casing {
padding: 0px 0px 25px 0px;
}
/*Header*/
#masthead {
height: 160px;
}
#top {
height: 100px;
width: 1000px;
}
.blogname {
width: 600px;
float: left;
margin: 20px 0px 0px 25px;
}
.blogname h1 {
font-weight: 800;
font-size: 30px;
text-transform: uppercase;
}
.blogname h1 a, .blogname h1 a:visited {
color: #000;
}
.blogname h2 {
font-size: 14px;
color: #333333;
}
/* TOP-MENU */
#botmenu {
height: 60px;
width: 1000px;
margin: 0px auto;
float: left;
background: url(http://3.bp.blogspot.com/-5UChsQh382s/UQhGdXy8_EI/AAAAAAAABAw/Pdm66BVYg2w/s000/menu.png) repeat-x;
}
#subnav {
clear: both;
color: #fff;
font-size: 14px;
text-transform: uppercase;
margin: 0 auto;
overflow: hidden;
width: 1000px;
}
#subnav ul {
float: left;
width: 970px;
padding: 0px 15px;
}
#subnav li {
float: left;
list-style-type: none;
font-weight: 700;
}
#subnav li a {
color: #e7e7e7;
display: block;
padding: 25px 10px 15px 10px;
position: relative;
text-decoration: none;
}
#subnav li a:hover,
#subnav li a:active,
#subnav .current-menu-item a {
background: url(http://1.bp.blogspot.com/-QjzO7_THles/UQhGdozMimI/AAAAAAAABA4/0f97og2MbQY/s000/menua.png) repeat-x;
color: #fff;
}
#subnav li a .sf-sub-indicator {
display: block;
overflow: hidden;
position: absolute;
text-indent: -9999px;
}
#subnav li li a,
#subnav li li a:link,
#subnav li li a:visited {
background-color: #383e40;
border-top-width: 0;
color: #e7e7e7;
font-size: 13px;
padding: 10px 10px;
position: relative;
text-transform: none;
width: 140px;
font-weight: 400;
}
#subnav li li a:hover,
#subnav li li a:active {
color: #fff;
background: #262A2B;
}
#subnav li ul {
height: auto;
padding: 0px 0px;
left: -9999px;
margin: 0 0 0 1px;
position: absolute;
width: 160px;
z-index: 9999;
}
#subnav li ul a {
width: 160px;
}
#subnav li ul ul {
margin: -38px 0 0 160px;
}
#subnav li:hover>ul,
#subnav li.sfHover ul {
left: auto;
}
/* SEARCH FORM */
#search {
width: 270px;
padding: 0px;
margin: 35px 25px 0px 0px;
display: inline-block;
float: right;
background: #f8f8f8;
border: 1px solid #e7e7e7;
}
#search form {
margin: 0px 0px 0px 0px;
padding: 0;
}
#search fieldset {
margin: 0;
padding: 0;
border: none;
}
#search p {
margin: 0;
font-size: 85%;
}
#s {
width: 200px;
background: #f8f8f8;
margin: 0px 0px 0px 0px;
padding: 5px 5px;
height: 20px;
border: none;
color: #555;
float: left;
display: inline;
}
#searchsubmit {
background: #2C3436;
border: none;
color: #fff;
display: block;
width: 60px;
height: 30px;
line-height: 30px;
float: right;
cursor: pointer;
margin: 0px 0px 0px 0px;
}
/*Carousel */
#videoslide {
background: #1c2122;
width: 1000px;
position: relative;
border-top: 5px solid #000;
height:348px;
overflow:hidden;
}
.caroselhead {
background: url(http://2.bp.blogspot.com/-jE_oWXntT7U/UQhGehGBGvI/AAAAAAAABBA/M4HJBugCbmM/s000/caros.png) top repeat-x;
height: 43px;
}
.caroselhead h2 {
float: left;
font-weight: 400;
text-transform: uppercase;
color: #fff;
padding-top: 8px;
margin-left: 25px;
}
.prev {
position: absolute;
top: 10px;
right: 50px;
width: 19px;
height: 19px;
background: url(http://3.bp.blogspot.com/-9S2IgU18M4Q/UQhGe1AsThI/AAAAAAAABBI/YnU1V3YcK6k/s000/left.png);
}
.next {
position: absolute;
top: 10px;
right: 25px;
width: 19px;
height: 19px;
background: url(http://4.bp.blogspot.com/-mh0cOgPed2A/UQhGfeozblI/AAAAAAAABBQ/4vV1vLrzHaY/s000/right.png);
}
.timer {
background-color: #F64118;
height: 1px;
width: 0px;
}
li.panel {
float: left;
width: 170px;
background: #eee;
margin-left: 25px;
margin-top: 25px;
margin-bottom: 25px;
list-style: none;
}
img.v-image {
margin: 10px 10px 0px 10px;
}
.panel h3 {
text-align: center;
text-transform: uppercase;
color: #000;
font-size: 14px;
margin: 10px 0px;
font-weight: 700;
}
.panel h3 a,.panel h3 a:visited {
color: #000;
}
/*home left*/
#home-content {
width: 560px;
margin: 25px 0px 0px 25px;
float: left;
}
h2.sectionhead {
font-weight: 400;
text-transform: uppercase;
color: #555;
border-bottom: 1px solid #bbb;
padding-bottom: 10px;
margin-bottom: 10px;
}
.story {
margin-bottom: 25px;
}
span.categ {
font-size: 10px;
text-transform: uppercase;
}
span.categ a, span.categ a:visited {
color: #3C95D5;
}
.story h2 {
font-weight: 700;
text-transform: uppercase;
font-size: 14px;
padding: 0px 0px 10px 0px;
}
.story h2 a, .story h2 a:visited {
color: #000;
}
img.s-image {
float: left;
margin: 5px 20px 0px 0px;
}
a.rmore {
padding: 3px 8px;
background: #333;
color: #fff;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
float:right;
margin-right:10px;
margin-top:5px;
}
/*Home right*/
#homeright {
width: 365px;
float: right;
margin-right: 25px;
margin-top: 25px;
}
.latest-review {
margin-bottom: 20px;
}
.reviewbox {
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 1px dotted #ddd;
}
.reviewbox h2 {
font-weight: 700;
text-transform: uppercase;
font-size: 14px;
padding: 0px 0px 10px 0px;
}
.reviewbox h2 a, .reviewbox h2 a:visited {
color: #000;
}
p.rate {
font-weight: 400;
text-transform: uppercase;
font-size: 12px;
margin-bottom: 0px;
}
p.orate {
font-weight: 700;
text-transform: uppercase;
font-size: 14px;
margin-bottom: 0px;
color: #E21212;
}
/*Article*/
#left {
float: left;
margin-left: 25px;
margin-top: 25px;
width: 640px;
word-wrap:break-word;
overflow:hidden;
}
.post {
margin-bottom: 20px;
}
.bposttitle {
padding-bottom: 20px;
}
.bposttitle h2, .bposttitle h2 a, .bposttitle h2 a:visited {
font-weight: 700;
color: #000;
font-size: 24px;
margin-bottom:5px;
}
.entry,.bentry {
line-height: 24px;
}
.entry p {
margin-bottom: 10px;
}
.entry h1,
.entry h2,
.entry h3,
.entry h4,
.entry h5,
.entry h6 {
margin: 0 0 20px 0;
}
.entry ul, .entry ol {
margin: .4em 0 1em;
line-height: 150%;
}
.entry ul li, .entry ol li {
list-style-position: outside;
margin-left: 1.6em;
}
.entry ol li {
list-style: decimal;
}
.entry ul li {
list-style: disc;
}
img.postim {
margin-bottom: 20px;
}
img.vs-image {
float: left;
margin: 5px 20px 20px 0px;
}
/*Review*/
.ratebar {
height: 30px;
width: 660px;
background: #eee;
margin: 10px 0px 0px 0px;
}
span.ratehead {
display: block;
width: 100px;
background: #222;
color: #fff;
text-transform: uppercase;
font-weight: 700;
padding: 0px 10px;
line-height: 30px;
float: left;
font-size: 18px;
}
span.ratevalue {
display: block;
width: 40px;
background: #000;
color: #fff;
text-transform: uppercase;
font-weight: 700;
line-height: 30px;
text-align: center;
float: left;
font-size: 18px;
}
span.rbar {
background: #5ED341;
display: block;
float: left;
height: 30px;
}
.rate-1 {
width: 50px
}
.rate-2 {
width: 100px
}
.rate-3 {
width: 150px
}
.rate-4 {
width: 200px
}
.rate-5 {
width: 250px
}
.rate-6 {
width: 300px
}
.rate-7 {
width: 350px
}
.rate-8 {
width: 400px
}
.rate-9 {
width: 450px
}
.rate-10 {
width: 500px
}
/*Sidebar*/
#right {
float: right;
margin-right: 25px;
margin-top: 25px;
width: 280px;
word-wrap:break-word;
overflow:hidden;
}
.sidebar {
color: #666666;
line-height: 20px;
}
.sidebar a {
text-decoration: none;
color: #666666;
}
.sidebar a: hover {
text-decoration: none;
color: #000000;
}
.sidebar .widget {
margin: 0 0 25px 0;
}
.sidebar .widget h2 {
color: #000000;
margin-bottom: 10px;
text-transform: uppercase;
padding: 0 0 0 0;
font-size: 14px;
font-weight: 700;
}
.sidebar .widget-content {
margin: 0;
}
.sidebar ul {
list-style-type: none;
list-style: none;
margin: 0;
padding: 0;
}
.sidebar ul li {
border-bottom: 1px solid #F4F4F4;
padding: 7px 0;
margin: 0px;
}
/*Footer*/
#bottom {
background: #1C2122;
width: 1000px;
}
#bottom ul {
margin: 0px;
padding: 0px;
}
.botwid {
float: left;
width: 280px;
margin: 28px 0px 25px 25px;
list-style: none;
}
.botwid .widget h2 {
padding: 0px 0px 15px 0px;
color: #fff;
font-size: 14px;
font-weight: 700;
text-transform: uppercase;
}
.botwid ul {
list-style-type: none;
margin: 0px;
padding: 0px 0px 0px 0px;
}
.botwid li {
list-style-type: none;
margin: 0;
padding: 0;
}
.botwid ul ul {
list-style-type: none;
margin: 0;
padding: 0px 0px 0px 0px;
background-repeat: no-repeat;
}
.botwid ul ul ul {
list-style-type: none;
margin: 0;
padding: 0;
border: 0;
}
.botwid ul ul ul ul {
list-style-type: none;
margin: 0;
padding: 0;
border: 0;
}
.botwid ul li {
padding: 7px 0px 7px 0px;
border-bottom: 1px dotted #444;
}
.botwid ul li a:link, .botwid ul li a:visited {
color: #888;
}
.botwid ul li a:hover {
color: #fff;
}
.botwid .textwidget {
padding: 7px 0px;
margin: 0;
line-height: 160%;
color: #888;
}
#footer {
background: #111;
padding: 25px 0px;
text-align: center;
}
.fcred,.fcred a, .fcred a:visited {
color: #eee;
}
/* Browser Resets */
#nbtfeature {
width:1000px;
height:500px;
overflow:hidden;
}
.flex-container a:active,
.flexslider a:active,
.flex-container a:focus,
.flexslider a:focus {outline: none;}
.slides,
.flex-control-nav,
.flex-direction-nav {margin: 0; padding: 0; list-style: none;}
/* FlexSlider Necessary Styles
*********************************/
.flexslider {margin: 0; padding: 0;}
.flexslider .slides > li {display: none; -webkit-backface-visibility: hidden;} /* Hide the slides before the JS is loaded. Avoids image jumping */
.flexslider .slides img {max-width: 100%; display: block;}
.flex-pauseplay span {text-transform: capitalize;}
/* Clearfix for the .slides element */
.slides:after {content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}
html[xmlns] .slides {display: block;}
* html .slides {height: 1%;}
/* No JavaScript Fallback */
/* If you are not using another script, such as Modernizr, make sure you
* include js that eliminates this class on page load */
.no-js .slides > li:first-child {display: block;}
/* FlexSlider Default Theme
*********************************/
.flexslider {background: #fff; position: relative; -webkit-border-radius: 5px; -moz-border-radius: 5px; -o-border-radius: 5px; border-radius: 5px; zoom: 1;}
.flexslider .slides {zoom: 1;}
.flexslider .slides > li {position: relative;}
/* Suggested container for "Slide" animation setups. Can replace this with your own, if you wish */
.flex-container {zoom: 1; position: relative;}
/* Caption style */
/* IE rgba() hack */
.flex-caption {background:url(http://4.bp.blogspot.com/-HIk92t1GNCA/UQhGf1S-3fI/AAAAAAAABBU/iNJ0ur-T20Y/s000/trans.png);}
.flex-caption {width: 950px; padding: 2% 25px; margin: 0; position: absolute; left: 0; bottom: 0; background: rgba(f,f,f,.3); color: #000; font-size: 14px; line-height: 22px;}
.flex-caption h3{ text-transform:uppercase; font-weight:700; color:#000; margin-bottom:5px;}
/* Direction Nav */
.flex-direction-nav { height: 0; }
.flex-direction-nav li a {width: 32px; height: 32px; margin: -16px 0 0; display: block; background: url(http://1.bp.blogspot.com/-Nj2T2OYJQOE/UQhGgvxXRUI/AAAAAAAABBg/BH2pkzGyjxY/s000/bg_direction_nav.png) no-repeat; position: absolute; top: 50%; cursor: pointer; text-indent: -999em;}
.flex-direction-nav li .next {background-position: -32px 0; right: 20px;}
.flex-direction-nav li .prev {left: 20px;}
.flex-direction-nav li .disabled {opacity: .3; filter:alpha(opacity=30); cursor: default;}
/* Control Nav */
.flex-control-nav {width: 100%; position: absolute; bottom: -30px; text-align: center;}
.flex-control-nav li {margin: 0 0 0 5px; display: inline-block; zoom: 1; *display: inline;}
.flex-control-nav li:first-child {margin: 0;}
.flex-control-nav li a {width: 13px; height: 13px; display: block; background: url(theme/bg_control_nav.png) no-repeat; cursor: pointer; text-indent: -999em;}
.flex-control-nav li a:hover {background-position: 0 -13px;}
.flex-control-nav li a.active {background-position: 0 -26px; cursor: default;}
h2.date-header {
margin: 1.5em 0 .5em;
display: none;
}
.main .widget {
margin: 0 0 5px;
padding: 0 0 2px;
}
.main .Blog {
border-bottom-width: 0;
}
#header .description {
color:#ffffff;
font-size:14px;
text-shadow:0px 1px 0px #000000;
}
/* Comments----------------------------------------------- */
#comments {
padding:10px;
}
#comment-name-url {
width: 365px;
float: left;
}
#comment-date {
width: 365px;
float: left;
margin-top: 5px;
font-size: 10px;
}
#comment-header {
float: left;
padding: 5px 0 40px 10px;
margin: 5px 0 15px 0;
position: relative;
background-color: #ffffff;
border: 1px dashed #eeeeee;
}
.avatar-image-container {
background: url(http: //4.bp.blogspot.com/_4HKUHirY_2U/TLlJUqSaolI/AAAAAAAAEq4/qpgAHAOe9x0/s1600/comment-avatar.jpg);
width: 32px;
height: 32px;
float: right;
margin: 5px 10px 5px 5px;
border: 1px solid #dddddd;
}
.avatar-image-container img {
width: 32px;
height: 32px;
}
a.comments-autor-name {
color: #000000;
font: normal bold 14px Arial, Tahoma, Verdana;
}
a.says {
color: #000000;
font: normal 14px Arial, Tahoma, Verdana;
}
.says a:hover {
text-decoration: none;
}
.deleted-comment {
font-style: italic;
color: gray;
}
#blog-pager-newer-link {
float: left;
}
#blog-pager-older-link {
float: right;
}
#blog-pager {
text-align: center;
}
.feed-links {
clear: both;
}
/* Profile ----------------------------------------------- */
.profile-img {
float: left;
margin-top: 0;
margin-right: 5px;
margin-bottom: 5px;
margin-left: 0;
padding: 4px;
border: 1px solid #eeeeee;
}
.profile-data {
margin: 0;
text-transform: uppercase;
letter-spacing: .1em;
color: #000000;
font-weight: bold;
line-height: 1.6em;
}
.profile-datablock {
margin: .5em 0 .5em;
}
.profile-textblock {
margin: 0.5em 0;
line-height: 1.6em;
}
.avatar-image-container {
background: url(http://4.bp.blogspot.com/-oEHFQC4ML6E/UQhGhA3j8TI/AAAAAAAABBo/FJug3ZNPqLA/s000/comment-avatar.jpg);
width: 32px;
height: 32px;
float: right;
margin: 5px 10px 5px 5px;
border: 1px solid #dddddd;
}
.avatar-image-container img {
width: 32px;
height: 32px;
}
.profile-link {
text-transform: uppercase;
letter-spacing: .1em;
}
.comment-form {
max-width: 600px;
}
#navbar-iframe {
height: 0;
visibility: hidden;
display: none;
}
.cover {
float: left;
width: 100%;
}
.PopularPosts .widget-content ul li {
padding:6px 0px;
}
.reaction-buttons table{
border:none;
margin-bottom:5px;
}
.reaction-buttons table, .reaction-buttons td{
border:none;
}
]]></b:skin>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js' type='text/javascript'/>
<script type='text/javascript'>
//<![CDATA[
jQuery(document).ready(function() {
/* Banner class */
jQuery('.squarebanner ul li:nth-child(even)').addClass('rbanner');
jQuery('ul.siderevs li:last,ul.sidetops li:last').css('border', 'none');
/* Navigation */
jQuery('#subnav ul.sfmenu').superfish({
delay: 500, // 0.1 second delay on mouseout
animation: {opacity:'show',height:'show'}, // fade-in and slide-down animation
dropShadows: true // disable drop shadows
});
jQuery('.flexslider').flexslider({
controlNav: false,
directionNav:true,
animation: "fade", //String: Select your animation type, "fade" or "slide"
slideshow: true //Boolean: Animate slider automatically
});
// Carousel
jQuery('#carousel').carouFredSel({
prev: '#prev2',
next: '#next2',
auto: {
pauseOnHover: 'resume',
onPauseStart: function( percentage, duration ) {
jQuery(this).trigger( 'configuration', ['width', function( value ) {
jQuery('#timer1').stop().animate({
width: value
}, {
duration: duration,
easing: 'linear'
});
}]);
},
onPauseEnd: function( percentage, duration ) {
jQuery('#timer1').stop().width( 0 );
},
onPausePause: function( percentage, duration ) {
jQuery('#timer1').stop();
}
}
});
});
//]]>
</script>
<script type='text/javascript'>
//<![CDATA[
/*
* Superfish v1.4.8 - jQuery menu widget
* Copyright (c) 2008 Joel Birch
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
*/
(function($){$.fn.superfish=function(op){var sf=$.fn.superfish,c=sf.c,$arrow=$(['<span class="',c.arrowClass,'"> »</span>'].join("")),over=function(){var $$=$(this),menu=getMenu($$);clearTimeout(menu.sfTimer);$$.showSuperfishUl().siblings().hideSuperfishUl();},out=function(){var $$=$(this),menu=getMenu($$),o=sf.op;clearTimeout(menu.sfTimer);menu.sfTimer=setTimeout(function(){o.retainPath=($.inArray($$[0],o.$path)>-1);$$.hideSuperfishUl();if(o.$path.length&&$$.parents(["li.",o.hoverClass].join("")).length<1){over.call(o.$path);}},o.delay);},getMenu=function($menu){var menu=$menu.parents(["ul.",c.menuClass,":first"].join(""))[0];sf.op=sf.o[menu.serial];return menu;},addArrow=function($a){$a.addClass(c.anchorClass).append($arrow.clone());};return this.each(function(){var s=this.serial=sf.o.length;var o=$.extend({},sf.defaults,op);o.$path=$("li."+o.pathClass,this).slice(0,o.pathLevels).each(function(){$(this).addClass([o.hoverClass,c.bcClass].join(" ")).filter("li:has(ul)").removeClass(o.pathClass);});sf.o[s]=sf.op=o;$("li:has(ul)",this)[($.fn.hoverIntent&&!o.disableHI)?"hoverIntent":"hover"](over,out).each(function(){if(o.autoArrows){addArrow($(">a:first-child",this));}}).not("."+c.bcClass).hideSuperfishUl();var $a=$("a",this);$a.each(function(i){var $li=$a.eq(i).parents("li");$a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});});o.onInit.call(this);}).each(function(){var menuClasses=[c.menuClass];if(sf.op.dropShadows&&!($.browser.msie&&$.browser.version<7)){menuClasses.push(c.shadowClass);}$(this).addClass(menuClasses.join(" "));});};var sf=$.fn.superfish;sf.o=[];sf.op={};sf.IE7fix=function(){var o=sf.op;if($.browser.msie&&$.browser.version>6&&o.dropShadows&&o.animation.opacity!=undefined){this.toggleClass(sf.c.shadowClass+"-off");}};sf.c={bcClass:"sf-breadcrumb",menuClass:"sf-js-enabled",anchorClass:"sf-with-ul",arrowClass:"sf-sub-indicator",shadowClass:"sf-shadow"};sf.defaults={hoverClass:"sfHover",pathClass:"overideThisToUse",pathLevels:1,delay:800,animation:{opacity:"show"},speed:"normal",autoArrows:true,dropShadows:true,disableHI:false,onInit:function(){},onBeforeShow:function(){},onShow:function(){},onHide:function(){}};$.fn.extend({hideSuperfishUl:function(){var o=sf.op,not=(o.retainPath===true)?o.$path:"";o.retainPath=false;var $ul=$(["li.",o.hoverClass].join(""),this).add(this).not(not).removeClass(o.hoverClass).find(">ul").hide().css("visibility","hidden");o.onHide.call($ul);return this;},showSuperfishUl:function(){var o=sf.op,sh=sf.c.shadowClass+"-off",$ul=this.addClass(o.hoverClass).find(">ul:hidden").css("visibility","visible");sf.IE7fix.call($ul);o.onBeforeShow.call($ul);$ul.animate(o.animation,o.speed,function(){sf.IE7fix.call($ul);o.onShow.call($ul);});return this;}});})(jQuery);
//]]>
</script>
<script type='text/javascript'>
//<![CDATA[
/*
* jQuery FlexSlider v1.8
* http://www.woothemes.com/flexslider/
*
* Copyright 2012 WooThemes
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*
* Contributing Author: Tyler Smith
*/
(function(a){a.flexslider=function(c,b){var d=a(c);a.data(c,"flexslider",d);d.init=function(){d.vars=a.extend({},a.flexslider.defaults,b);a.data(c,"flexsliderInit",true);d.container=a(".slides",d).first();d.slides=a(".slides:first > li",d);d.count=d.slides.length;d.animating=false;d.currentSlide=d.vars.slideToStart;d.animatingTo=d.currentSlide;d.atEnd=(d.currentSlide==0)?true:false;d.eventType=("ontouchstart" in document.documentElement)?"touchstart":"click";d.cloneCount=0;d.cloneOffset=0;d.manualPause=false;d.vertical=(d.vars.slideDirection=="vertical");d.prop=(d.vertical)?"top":"marginLeft";d.args={};d.transitions="webkitTransition" in document.body.style;if(d.transitions){d.prop="-webkit-transform"}if(d.vars.controlsContainer!=""){d.controlsContainer=a(d.vars.controlsContainer).eq(a(".slides").index(d.container));d.containerExists=d.controlsContainer.length>0}if(d.vars.manualControls!=""){d.manualControls=a(d.vars.manualControls,((d.containerExists)?d.controlsContainer:d));d.manualExists=d.manualControls.length>0}if(d.vars.randomize){d.slides.sort(function(){return(Math.round(Math.random())-0.5)});d.container.empty().append(d.slides)}if(d.vars.animation.toLowerCase()=="slide"){if(d.transitions){d.setTransition(0)}d.css({overflow:"hidden"});if(d.vars.animationLoop){d.cloneCount=2;d.cloneOffset=1;d.container.append(d.slides.filter(":first").clone().addClass("clone")).prepend(d.slides.filter(":last").clone().addClass("clone"))}d.newSlides=a(".slides:first > li",d);var m=(-1*(d.currentSlide+d.cloneOffset));if(d.vertical){d.newSlides.css({display:"block",width:"100%","float":"left"});d.container.height((d.count+d.cloneCount)*200+"%").css("position","absolute").width("100%");setTimeout(function(){d.css({position:"relative"}).height(d.slides.filter(":first").height());d.args[d.prop]=(d.transitions)?"translate3d(0,"+m*d.height()+"px,0)":m*d.height()+"px";d.container.css(d.args)},100)}else{d.args[d.prop]=(d.transitions)?"translate3d("+m*d.width()+"px,0,0)":m*d.width()+"px";d.container.width((d.count+d.cloneCount)*200+"%").css(d.args);setTimeout(function(){d.newSlides.width(d.width()).css({"float":"left",display:"block"})},100)}}else{d.transitions=false;d.slides.css({width:"100%","float":"left",marginRight:"-100%"}).eq(d.currentSlide).fadeIn(d.vars.animationDuration)}if(d.vars.controlNav){if(d.manualExists){d.controlNav=d.manualControls}else{var e=a('<ol class="flex-control-nav"></ol>');var s=1;for(var t=0;t<d.count;t++){e.append("<li><a>"+s+"</a></li>");s++}if(d.containerExists){a(d.controlsContainer).append(e);d.controlNav=a(".flex-control-nav li a",d.controlsContainer)}else{d.append(e);d.controlNav=a(".flex-control-nav li a",d)}}d.controlNav.eq(d.currentSlide).addClass("active");d.controlNav.bind(d.eventType,function(i){i.preventDefault();if(!a(this).hasClass("active")){(d.controlNav.index(a(this))>d.currentSlide)?d.direction="next":d.direction="prev";d.flexAnimate(d.controlNav.index(a(this)),d.vars.pauseOnAction)}})}if(d.vars.directionNav){var v=a('<ul class="flex-direction-nav"><li><a class="prev" href="#">'+d.vars.prevText+'</a></li><li><a class="next" href="#">'+d.vars.nextText+"</a></li></ul>");if(d.containerExists){a(d.controlsContainer).append(v);d.directionNav=a(".flex-direction-nav li a",d.controlsContainer)}else{d.append(v);d.directionNav=a(".flex-direction-nav li a",d)}if(!d.vars.animationLoop){if(d.currentSlide==0){d.directionNav.filter(".prev").addClass("disabled")}else{if(d.currentSlide==d.count-1){d.directionNav.filter(".next").addClass("disabled")}}}d.directionNav.bind(d.eventType,function(i){i.preventDefault();var j=(a(this).hasClass("next"))?d.getTarget("next"):d.getTarget("prev");if(d.canAdvance(j)){d.flexAnimate(j,d.vars.pauseOnAction)}})}if(d.vars.keyboardNav&&a("ul.slides").length==1){function h(i){if(d.animating){return}else{if(i.keyCode!=39&&i.keyCode!=37){return}else{if(i.keyCode==39){var j=d.getTarget("next")}else{if(i.keyCode==37){var j=d.getTarget("prev")}}if(d.canAdvance(j)){d.flexAnimate(j,d.vars.pauseOnAction)}}}}a(document).bind("keyup",h)}if(d.vars.mousewheel){d.mousewheelEvent=(/Firefox/i.test(navigator.userAgent))?"DOMMouseScroll":"mousewheel";d.bind(d.mousewheelEvent,function(y){y.preventDefault();y=y?y:window.event;var i=y.detail?y.detail*-1:y.originalEvent.wheelDelta/40,j=(i<0)?d.getTarget("next"):d.getTarget("prev");if(d.canAdvance(j)){d.flexAnimate(j,d.vars.pauseOnAction)}})}if(d.vars.slideshow){if(d.vars.pauseOnHover&&d.vars.slideshow){d.hover(function(){d.pause()},function(){if(!d.manualPause){d.resume()}})}d.animatedSlides=setInterval(d.animateSlides,d.vars.slideshowSpeed)}if(d.vars.pausePlay){var q=a('<div class="flex-pauseplay"><span></span></div>');if(d.containerExists){d.controlsContainer.append(q);d.pausePlay=a(".flex-pauseplay span",d.controlsContainer)}else{d.append(q);d.pausePlay=a(".flex-pauseplay span",d)}var n=(d.vars.slideshow)?"pause":"play";d.pausePlay.addClass(n).text((n=="pause")?d.vars.pauseText:d.vars.playText);d.pausePlay.bind(d.eventType,function(i){i.preventDefault();if(a(this).hasClass("pause")){d.pause();d.manualPause=true}else{d.resume();d.manualPause=false}})}if("ontouchstart" in document.documentElement){var w,u,l,r,o,x,p=false;d.each(function(){if("ontouchstart" in document.documentElement){this.addEventListener("touchstart",g,false)}});function g(i){if(d.animating){i.preventDefault()}else{if(i.touches.length==1){d.pause();r=(d.vertical)?d.height():d.width();x=Number(new Date());l=(d.vertical)?(d.currentSlide+d.cloneOffset)*d.height():(d.currentSlide+d.cloneOffset)*d.width();w=(d.vertical)?i.touches[0].pageY:i.touches[0].pageX;u=(d.vertical)?i.touches[0].pageX:i.touches[0].pageY;d.setTransition(0);this.addEventListener("touchmove",k,false);this.addEventListener("touchend",f,false)}}}function k(i){o=(d.vertical)?w-i.touches[0].pageY:w-i.touches[0].pageX;p=(d.vertical)?(Math.abs(o)<Math.abs(i.touches[0].pageX-u)):(Math.abs(o)<Math.abs(i.touches[0].pageY-u));if(!p){i.preventDefault();if(d.vars.animation=="slide"&&d.transitions){if(!d.vars.animationLoop){o=o/((d.currentSlide==0&&o<0||d.currentSlide==d.count-1&&o>0)?(Math.abs(o)/r+2):1)}d.args[d.prop]=(d.vertical)?"translate3d(0,"+(-l-o)+"px,0)":"translate3d("+(-l-o)+"px,0,0)";d.container.css(d.args)}}}function f(j){d.animating=false;if(d.animatingTo==d.currentSlide&&!p&&!(o==null)){var i=(o>0)?d.getTarget("next"):d.getTarget("prev");if(d.canAdvance(i)&&Number(new Date())-x<550&&Math.abs(o)>20||Math.abs(o)>r/2){d.flexAnimate(i,d.vars.pauseOnAction)}else{d.flexAnimate(d.currentSlide,d.vars.pauseOnAction)}}this.removeEventListener("touchmove",k,false);this.removeEventListener("touchend",f,false);w=null;u=null;o=null;l=null}}if(d.vars.animation.toLowerCase()=="slide"){a(window).resize(function(){if(!d.animating&&d.is(":visible")){if(d.vertical){d.height(d.slides.filter(":first").height());d.args[d.prop]=(-1*(d.currentSlide+d.cloneOffset))*d.slides.filter(":first").height()+"px";if(d.transitions){d.setTransition(0);d.args[d.prop]=(d.vertical)?"translate3d(0,"+d.args[d.prop]+",0)":"translate3d("+d.args[d.prop]+",0,0)"}d.container.css(d.args)}else{d.newSlides.width(d.width());d.args[d.prop]=(-1*(d.currentSlide+d.cloneOffset))*d.width()+"px";if(d.transitions){d.setTransition(0);d.args[d.prop]=(d.vertical)?"translate3d(0,"+d.args[d.prop]+",0)":"translate3d("+d.args[d.prop]+",0,0)"}d.container.css(d.args)}}})}d.vars.start(d)};d.flexAnimate=function(g,f){if(!d.animating&&d.is(":visible")){d.animating=true;d.animatingTo=g;d.vars.before(d);if(f){d.pause()}if(d.vars.controlNav){d.controlNav.removeClass("active").eq(g).addClass("active")}d.atEnd=(g==0||g==d.count-1)?true:false;if(!d.vars.animationLoop&&d.vars.directionNav){if(g==0){d.directionNav.removeClass("disabled").filter(".prev").addClass("disabled")}else{if(g==d.count-1){d.directionNav.removeClass("disabled").filter(".next").addClass("disabled")}else{d.directionNav.removeClass("disabled")}}}if(!d.vars.animationLoop&&g==d.count-1){d.pause();d.vars.end(d)}if(d.vars.animation.toLowerCase()=="slide"){var e=(d.vertical)?d.slides.filter(":first").height():d.slides.filter(":first").width();if(d.currentSlide==0&&g==d.count-1&&d.vars.animationLoop&&d.direction!="next"){d.slideString="0px"}else{if(d.currentSlide==d.count-1&&g==0&&d.vars.animationLoop&&d.direction!="prev"){d.slideString=(-1*(d.count+1))*e+"px"}else{d.slideString=(-1*(g+d.cloneOffset))*e+"px"}}d.args[d.prop]=d.slideString;if(d.transitions){d.setTransition(d.vars.animationDuration);d.args[d.prop]=(d.vertical)?"translate3d(0,"+d.slideString+",0)":"translate3d("+d.slideString+",0,0)";d.container.css(d.args).one("webkitTransitionEnd transitionend",function(){d.wrapup(e)})}else{d.container.animate(d.args,d.vars.animationDuration,function(){d.wrapup(e)})}}else{d.slides.eq(d.currentSlide).fadeOut(d.vars.animationDuration);d.slides.eq(g).fadeIn(d.vars.animationDuration,function(){d.wrapup()})}}};d.wrapup=function(e){if(d.vars.animation=="slide"){if(d.currentSlide==0&&d.animatingTo==d.count-1&&d.vars.animationLoop){d.args[d.prop]=(-1*d.count)*e+"px";if(d.transitions){d.setTransition(0);d.args[d.prop]=(d.vertical)?"translate3d(0,"+d.args[d.prop]+",0)":"translate3d("+d.args[d.prop]+",0,0)"}d.container.css(d.args)}else{if(d.currentSlide==d.count-1&&d.animatingTo==0&&d.vars.animationLoop){d.args[d.prop]=-1*e+"px";if(d.transitions){d.setTransition(0);d.args[d.prop]=(d.vertical)?"translate3d(0,"+d.args[d.prop]+",0)":"translate3d("+d.args[d.prop]+",0,0)"}d.container.css(d.args)}}}d.animating=false;d.currentSlide=d.animatingTo;d.vars.after(d)};d.animateSlides=function(){if(!d.animating){d.flexAnimate(d.getTarget("next"))}};d.pause=function(){clearInterval(d.animatedSlides);if(d.vars.pausePlay){d.pausePlay.removeClass("pause").addClass("play").text(d.vars.playText)}};d.resume=function(){d.animatedSlides=setInterval(d.animateSlides,d.vars.slideshowSpeed);if(d.vars.pausePlay){d.pausePlay.removeClass("play").addClass("pause").text(d.vars.pauseText)}};d.canAdvance=function(e){if(!d.vars.animationLoop&&d.atEnd){if(d.currentSlide==0&&e==d.count-1&&d.direction!="next"){return false}else{if(d.currentSlide==d.count-1&&e==0&&d.direction=="next"){return false}else{return true}}}else{return true}};d.getTarget=function(e){d.direction=e;if(e=="next"){return(d.currentSlide==d.count-1)?0:d.currentSlide+1}else{return(d.currentSlide==0)?d.count-1:d.currentSlide-1}};d.setTransition=function(e){d.container.css({"-webkit-transition-duration":(e/1000)+"s"})};d.init()};a.flexslider.defaults={animation:"fade",slideDirection:"horizontal",slideshow:true,slideshowSpeed:7000,animationDuration:600,directionNav:true,controlNav:true,keyboardNav:true,mousewheel:false,prevText:"Previous",nextText:"Next",pausePlay:false,pauseText:"Pause",playText:"Play",randomize:false,slideToStart:0,animationLoop:true,pauseOnAction:true,pauseOnHover:false,controlsContainer:"",manualControls:"",start:function(){},before:function(){},after:function(){},end:function(){}};a.fn.flexslider=function(b){return this.each(function(){if(a(this).find(".slides li").length==1){a(this).find(".slides li").fadeIn(400)}else{if(a(this).data("flexsliderInit")!=true){new a.flexslider(this,b)}}})}})(jQuery);
//]]>
</script>
<script type='text/javascript'>
//<![CDATA[
/*
* jQuery carouFredSel 5.5.0
* Demo's and documentation:
* caroufredsel.frebsite.nl
*
* Copyright (c) 2012 Fred Heusschen
* www.frebsite.nl
*
* Dual licensed under the MIT and GPL licenses.
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*/
(function($) {
// LOCAL
if ($.fn.carouFredSel) return;
$.fn.carouFredSel = function(options, configs) {
if (this.length == 0) {
debug(true, 'No element found for "'+this.selector+'".');
return this;
}
if (this.length > 1) {
return this.each(function() {
$(this).carouFredSel(options, configs);
});
}
var $cfs = this,
$tt0 = this[0];
if ($cfs.data('cfs_isCarousel')) {
var starting_position = $cfs.triggerHandler('_cfs_currentPosition');
$cfs.trigger('_cfs_destroy', true);
} else {
var starting_position = false;
}
$cfs._cfs_init = function(o, setOrig, start) {
o = go_getObject($tt0, o);
// DEPRECATED
if (o.debug) {
conf.debug = o.debug;
debug(conf, 'The "debug" option should be moved to the second configuration-object.');
}
// /DEPRECATED
var obs = ['items', 'scroll', 'auto', 'prev', 'next', 'pagination'];
for (var a = 0, l = obs.length; a < l; a++) {
o[obs[a]] = go_getObject($tt0, o[obs[a]]);
}
if (typeof o.scroll == 'number') {
if (o.scroll <= 50) o.scroll = { 'items' : o.scroll };
else o.scroll = { 'duration' : o.scroll };
} else {
if (typeof o.scroll == 'string') o.scroll = { 'easing' : o.scroll };
}
if (typeof o.items == 'number') o.items = { 'visible' : o.items };
else if ( o.items == 'variable') o.items = { 'visible' : o.items,
'width' : o.items,
'height' : o.items };
if (typeof o.items != 'object') o.items = {};
if (setOrig) opts_orig = $.extend(true, {}, $.fn.carouFredSel.defaults, o);
opts = $.extend(true, {}, $.fn.carouFredSel.defaults, o);
if (typeof opts.items.visibleConf != 'object') opts.items.visibleConf = {};
if (opts.items.start == 0 && typeof start == 'number') {
opts.items.start = start;
}
crsl.upDateOnWindowResize = (opts.responsive);
crsl.direction = (opts.direction == 'up' || opts.direction == 'left') ? 'next' : 'prev';
var dims = [
['width' , 'innerWidth' , 'outerWidth' , 'height' , 'innerHeight' , 'outerHeight' , 'left', 'top' , 'marginRight' , 0, 1, 2, 3],
['height' , 'innerHeight' , 'outerHeight' , 'width' , 'innerWidth' , 'outerWidth' , 'top' , 'left', 'marginBottom', 3, 2, 1, 0]
];
var dn = dims[0].length,
dx = (opts.direction == 'right' || opts.direction == 'left') ? 0 : 1;
opts.d = {};
for (var d = 0; d < dn; d++) {
opts.d[dims[0][d]] = dims[dx][d];
}
var all_itm = $cfs.children();
// check visible items
switch (typeof opts.items.visible) {
// min and max visible items
case 'object':
opts.items.visibleConf.min = opts.items.visible.min;
opts.items.visibleConf.max = opts.items.visible.max;
opts.items.visible = false;
break;
case 'string':
// variable visible items
if (opts.items.visible == 'variable') {
opts.items.visibleConf.variable = true;
// adjust string visible items
} else {
opts.items.visibleConf.adjust = opts.items.visible;
}
opts.items.visible = false;
break;
// function visible items
case 'function':
opts.items.visibleConf.adjust = opts.items.visible;
opts.items.visible = false;
break;
}
// set items filter
if (typeof opts.items.filter == 'undefined') {
opts.items.filter = (all_itm.filter(':hidden').length > 0) ? ':visible' : '*';
}
// primary size set to auto -> measure largest size and set it
if (opts[opts.d['width']] == 'auto') {
opts[opts.d['width']] = ms_getTrueLargestSize(all_itm, opts, 'outerWidth');
}
// primary size percentage
if (ms_isPercentage(opts[opts.d['width']]) && !opts.responsive) {
opts[opts.d['width']] = ms_getPercentage(ms_getTrueInnerSize($wrp.parent(), opts, 'innerWidth'), opts[opts.d['width']]);
crsl.upDateOnWindowResize = true;
}
// secondary size set to auto -> measure largest size and set it
if (opts[opts.d['height']] == 'auto') {
opts[opts.d['height']] = ms_getTrueLargestSize(all_itm, opts, 'outerHeight');
}
// primary item-size not set
if (!opts.items[opts.d['width']]) {
// responsive carousel -> set to largest
if (opts.responsive) {
debug(true, 'Set a '+opts.d['width']+' for the items!');
opts.items[opts.d['width']] = ms_getTrueLargestSize(all_itm, opts, 'outerWidth');
// non-responsive -> measure it or set to "variable"
} else {
opts.items[opts.d['width']] = (ms_hasVariableSizes(all_itm, opts, 'outerWidth'))
? 'variable'
: all_itm[opts.d['outerWidth']](true);
}
}
// secondary item-size not set -> measure it or set to "variable"
if (!opts.items[opts.d['height']]) {
opts.items[opts.d['height']] = (ms_hasVariableSizes(all_itm, opts, 'outerHeight'))
? 'variable'
: all_itm[opts.d['outerHeight']](true);
}
// secondary size not set -> set to secondary item-size
if (!opts[opts.d['height']]) {
opts[opts.d['height']] = opts.items[opts.d['height']];
}
// visible-items not set
if (!opts.items.visible && !opts.responsive) {
// primary item-size variable -> set visible items variable
if (opts.items[opts.d['width']] == 'variable') {
opts.items.visibleConf.variable = true;
}
if (!opts.items.visibleConf.variable) {
// primary size is number -> calculate visible-items
if (typeof opts[opts.d['width']] == 'number') {
opts.items.visible = Math.floor(opts[opts.d['width']] / opts.items[opts.d['width']]);
} else {
// measure and calculate primary size and visible-items
var maxS = ms_getTrueInnerSize($wrp.parent(), opts, 'innerWidth');
opts.items.visible = Math.floor(maxS / opts.items[opts.d['width']]);
opts[opts.d['width']] = opts.items.visible * opts.items[opts.d['width']];
if (!opts.items.visibleConf.adjust) opts.align = false;
}
if (opts.items.visible == 'Infinity' || opts.items.visible < 1) {
debug(true, 'Not a valid number of visible items: Set to "variable".');
opts.items.visibleConf.variable = true;
}
}
}
// primary size not set -> calculate it or set to "variable"
if (!opts[opts.d['width']]) {
opts[opts.d['width']] = 'variable';
if (!opts.responsive && opts.items.filter == '*' && !opts.items.visibleConf.variable && opts.items[opts.d['width']] != 'variable') {
opts[opts.d['width']] = opts.items.visible * opts.items[opts.d['width']];
opts.align = false;
}
}
// variable primary item-sizes with variabe visible-items
if (opts.items.visibleConf.variable) {
opts.maxDimention = (opts[opts.d['width']] == 'variable')
? ms_getTrueInnerSize($wrp.parent(), opts, 'innerWidth')
: opts[opts.d['width']];
if (opts.align === false) {
opts[opts.d['width']] = 'variable';
}
opts.items.visible = gn_getVisibleItemsNext(all_itm, opts, 0);
// set visible items by filter
} else if (opts.items.filter != '*') {
opts.items.visibleConf.org = opts.items.visible;
opts.items.visible = gn_getVisibleItemsNextFilter(all_itm, opts, 0);
}
// align not set -> set to center if primary size is number
if (typeof opts.align == 'undefined') {
opts.align = (opts[opts.d['width']] == 'variable')
? false
: 'center';
}
opts.items.visible = cf_getItemsAdjust(opts.items.visible, opts, opts.items.visibleConf.adjust, $tt0);
opts.items.visibleConf.old = opts.items.visible;
opts.usePadding = false;
if (opts.responsive) {
if (!opts.items.visibleConf.min) opts.items.visibleConf.min = opts.items.visible;
if (!opts.items.visibleConf.max) opts.items.visibleConf.max = opts.items.visible;
opts.align = false;
opts.padding = [0, 0, 0, 0];
var isVisible = $wrp.is(':visible');
if (isVisible) $wrp.hide();
var fullS = ms_getPercentage(ms_getTrueInnerSize($wrp.parent(), opts, 'innerWidth'), opts[opts.d['width']]);
if (typeof opts[opts.d['width']] == 'number' && fullS < opts[opts.d['width']]) {
fullS = opts[opts.d['width']];
}
if (isVisible) $wrp.show();
var visb = cf_getItemAdjustMinMax(Math.ceil(fullS / opts.items[opts.d['width']]), opts.items.visibleConf);
if (visb > all_itm.length) {
visb = all_itm.length;
}
var newS = Math.floor(fullS/visb),
seco = opts[opts.d['height']],
secp = ms_isPercentage(seco);
all_itm.each(function() {
var $t = $(this),
nw = newS - ms_getPaddingBorderMargin($t, opts, 'Width');
$t[opts.d['width']](nw);
if (secp) {
$t[opts.d['height']](ms_getPercentage(nw, seco));
}
});
opts.items.visible = visb;
opts.items[opts.d['width']] = newS;
opts[opts.d['width']] = visb * newS;
} else {
opts.padding = cf_getPadding(opts.padding);
if (opts.align == 'top') opts.align = 'left';
if (opts.align == 'bottom') opts.align = 'right';
switch (opts.align) {
// align: center, left or right
case 'center':
case 'left':
case 'right':
if (opts[opts.d['width']] != 'variable') {
var p = cf_getAlignPadding(gi_getCurrentItems(all_itm, opts), opts);
opts.usePadding = true;
opts.padding[opts.d[1]] = p[1];
opts.padding[opts.d[3]] = p[0];
}
break;
// padding
default:
opts.align = false;
opts.usePadding = (
opts.padding[0] == 0 &&
opts.padding[1] == 0 &&
opts.padding[2] == 0 &&
opts.padding[3] == 0
) ? false : true;
break;
}
}
if (typeof opts.cookie == 'boolean' && opts.cookie) opts.cookie = 'caroufredsel_cookie_'+$cfs.attr('id');
if (typeof opts.items.minimum != 'number') opts.items.minimum = opts.items.visible;
if (typeof opts.scroll.duration != 'number') opts.scroll.duration = 500;
if (typeof opts.scroll.items == 'undefined') opts.scroll.items = (opts.items.visibleConf.variable || opts.items.filter != '*') ? 'visible' : opts.items.visible;
opts.auto = go_getNaviObject($tt0, opts.auto, 'auto');
opts.prev = go_getNaviObject($tt0, opts.prev);
opts.next = go_getNaviObject($tt0, opts.next);
opts.pagination = go_getNaviObject($tt0, opts.pagination, 'pagination');
opts.auto = $.extend(true, {}, opts.scroll, opts.auto);
opts.prev = $.extend(true, {}, opts.scroll, opts.prev);
opts.next = $.extend(true, {}, opts.scroll, opts.next);
opts.pagination = $.extend(true, {}, opts.scroll, opts.pagination);
if (typeof opts.pagination.keys != 'boolean') opts.pagination.keys = false;
if (typeof opts.pagination.anchorBuilder != 'function'
&& opts.pagination.anchorBuilder !== false) opts.pagination.anchorBuilder = $.fn.carouFredSel.pageAnchorBuilder;
if (typeof opts.auto.play != 'boolean') opts.auto.play = true;
if (typeof opts.auto.delay != 'number') opts.auto.delay = 0;
if (typeof opts.auto.pauseOnEvent == 'undefined') opts.auto.pauseOnEvent = true;
if (typeof opts.auto.pauseOnResize != 'boolean') opts.auto.pauseOnResize = true;
if (typeof opts.auto.pauseDuration != 'number') opts.auto.pauseDuration = (opts.auto.duration < 10) ? 2500 : opts.auto.duration * 5;
if (opts.synchronise) {
opts.synchronise = cf_getSynchArr(opts.synchronise);
}
if (conf.debug) {
debug(conf, 'Carousel width: '+opts.width);
debug(conf, 'Carousel height: '+opts.height);
if (opts.maxDimention) debug(conf, 'Available '+opts.d['width']+': '+opts.maxDimention);
debug(conf, 'Item widths: '+opts.items.width);
debug(conf, 'Item heights: '+opts.items.height);
debug(conf, 'Number of items visible: '+opts.items.visible);
if (opts.auto.play) debug(conf, 'Number of items scrolled automatically: '+opts.auto.items);
if (opts.prev.button) debug(conf, 'Number of items scrolled backward: '+opts.prev.items);
if (opts.next.button) debug(conf, 'Number of items scrolled forward: '+opts.next.items);
}
}; // /init
$cfs._cfs_build = function() {
$cfs.data('cfs_isCarousel', true);
var orgCSS = {
'textAlign' : $cfs.css('textAlign'),
'float' : $cfs.css('float'),
'position' : $cfs.css('position'),
'top' : $cfs.css('top'),
'right' : $cfs.css('right'),
'bottom' : $cfs.css('bottom'),
'left' : $cfs.css('left'),
'width' : $cfs.css('width'),
'height' : $cfs.css('height'),
'marginTop' : $cfs.css('marginTop'),
'marginRight' : $cfs.css('marginRight'),
'marginBottom' : $cfs.css('marginBottom'),
'marginLeft' : $cfs.css('marginLeft')
};
switch (orgCSS.position) {
case 'absolute':
var newPosition = 'absolute';
break;
case 'fixed':
var newPosition = 'fixed';
break;
default:
var newPosition = 'relative';
}
$wrp.css(orgCSS).css({
'overflow' : 'hidden',
'position' : newPosition
});
$cfs.data('cfs_origCss', orgCSS).css({
'textAlign' : 'left',
'float' : 'none',
'position' : 'absolute',
'top' : 0,
'left' : 0,
'marginTop' : 0,
'marginRight' : 0,
'marginBottom' : 0,
'marginLeft' : 0
});
if (opts.usePadding) {
$cfs.children().each(function() {
var m = parseInt($(this).css(opts.d['marginRight']));
if (isNaN(m)) m = 0;
$(this).data('cfs_origCssMargin', m);
});
}
}; // /build
$cfs._cfs_bind_events = function() {
$cfs._cfs_unbind_events();
// stop event
$cfs.bind(cf_e('stop', conf), function(e, imm) {
e.stopPropagation();
// button
if (!crsl.isStopped) {
if (opts.auto.button) {
opts.auto.button.addClass(cf_c('stopped', conf));
}
}
// set stopped
crsl.isStopped = true;
if (opts.auto.play) {
opts.auto.play = false;
$cfs.trigger(cf_e('pause', conf), imm);
}
return true;
});
// finish event
$cfs.bind(cf_e('finish', conf), function(e) {
e.stopPropagation();
if (crsl.isScrolling) {
sc_stopScroll(scrl);
}
return true;
});
// pause event
$cfs.bind(cf_e('pause', conf), function(e, imm, res) {
e.stopPropagation();
tmrs = sc_clearTimers(tmrs);
// immediately pause
if (imm && crsl.isScrolling) {
scrl.isStopped = true;
var nst = getTime() - scrl.startTime;
scrl.duration -= nst;
if (scrl.pre) scrl.pre.duration -= nst;
if (scrl.post) scrl.post.duration -= nst;
sc_stopScroll(scrl, false);
}
// update remaining pause-time
if (!crsl.isPaused && !crsl.isScrolling) {
if (res) tmrs.timePassed += getTime() - tmrs.startTime;
}
// button
if (!crsl.isPaused) {
if (opts.auto.button) {
opts.auto.button.addClass(cf_c('paused', conf));
}
}
// set paused
crsl.isPaused = true;
// pause pause callback
if (opts.auto.onPausePause) {
var dur1 = opts.auto.pauseDuration - tmrs.timePassed,
perc = 100 - Math.ceil( dur1 * 100 / opts.auto.pauseDuration );
opts.auto.onPausePause.call($tt0, perc, dur1);
}
return true;
});
// play event
$cfs.bind(cf_e('play', conf), function(e, dir, del, res) {
e.stopPropagation();
tmrs = sc_clearTimers(tmrs);
// sort params
var v = [dir, del, res],
t = ['string', 'number', 'boolean'],
a = cf_sortParams(v, t);
var dir = a[0],
del = a[1],
res = a[2];
if (dir != 'prev' && dir != 'next') dir = crsl.direction;
if (typeof del != 'number') del = 0;
if (typeof res != 'boolean') res = false;
// stopped?
if (res) {
crsl.isStopped = false;
opts.auto.play = true;
}
if (!opts.auto.play) {
e.stopImmediatePropagation();
return debug(conf, 'Carousel stopped: Not scrolling.');
}
// button
if (crsl.isPaused) {
if (opts.auto.button) {
opts.auto.button.removeClass(cf_c('stopped', conf));
opts.auto.button.removeClass(cf_c('paused', conf));
}
}
// set playing
crsl.isPaused = false;
tmrs.startTime = getTime();
// timeout the scrolling
var dur1 = opts.auto.pauseDuration + del;
dur2 = dur1 - tmrs.timePassed;
perc = 100 - Math.ceil(dur2 * 100 / dur1);
tmrs.auto = setTimeout(function() {
if (opts.auto.onPauseEnd) {
opts.auto.onPauseEnd.call($tt0, perc, dur2);
}
if (crsl.isScrolling) {
$cfs.trigger(cf_e('play', conf), dir);
} else {
$cfs.trigger(cf_e(dir, conf), opts.auto);
}
}, dur2);
// pause start callback
if (opts.auto.onPauseStart) {
opts.auto.onPauseStart.call($tt0, perc, dur2);
}
return true;
});
// resume event
$cfs.bind(cf_e('resume', conf), function(e) {
e.stopPropagation();
if (scrl.isStopped) {
scrl.isStopped = false;
crsl.isPaused = false;
crsl.isScrolling = true;
scrl.startTime = getTime();
sc_startScroll(scrl);
} else {
$cfs.trigger(cf_e('play', conf));
}
return true;
});
// prev + next events
$cfs.bind(cf_e('prev', conf)+' '+cf_e('next', conf), function(e, obj, num, clb) {
e.stopPropagation();
// stopped or hidden carousel, don't scroll, don't queue
if (crsl.isStopped || $cfs.is(':hidden')) {
e.stopImmediatePropagation();
return debug(conf, 'Carousel stopped or hidden: Not scrolling.');
}
// not enough items
if (opts.items.minimum >= itms.total) {
e.stopImmediatePropagation();
return debug(conf, 'Not enough items ('+itms.total+', '+opts.items.minimum+' needed): Not scrolling.');
}
// get config
var v = [obj, num, clb],
t = ['object', 'number/string', 'function'],
a = cf_sortParams(v, t);
var obj = a[0],
num = a[1],
clb = a[2];
var eType = e.type.substr(conf.events.prefix.length);
if (typeof obj != 'object' || obj == null) obj = opts[eType];
if (typeof clb == 'function') obj.onAfter = clb;
if (typeof num != 'number') {
if (opts.items.filter != '*') {
num = 'visible';
} else {
var arr = [num, obj.items, opts[eType].items];
for (var a = 0, l = arr.length; a < l; a++) {
if (typeof arr[a] == 'number' || arr[a] == 'page' || arr[a] == 'visible') {
num = arr[a];
break;
}
}
}
switch(num) {
case 'page':
e.stopImmediatePropagation();
return $cfs.triggerHandler(eType+'Page', [obj, clb]);
break;
case 'visible':
if (!opts.items.visibleConf.variable && opts.items.filter == '*') {
num = opts.items.visible;
}
break;
}
}
// resume animation, add current to queue
if (scrl.isStopped) {
$cfs.trigger(cf_e('resume', conf));
$cfs.trigger(cf_e('queue', conf), [eType, [obj, num, clb]]);
e.stopImmediatePropagation();
return debug(conf, 'Carousel resumed scrolling.');
}
// queue if scrolling
if (obj.duration > 0) {
if (crsl.isScrolling) {
if (obj.queue) $cfs.trigger(cf_e('queue', conf), [eType, [obj, num, clb]]);
e.stopImmediatePropagation();
return debug(conf, 'Carousel currently scrolling.');
}
}
// test conditions callback
if (obj.conditions && !obj.conditions.call($tt0)) {
e.stopImmediatePropagation();
return debug(conf, 'Callback "conditions" returned false.');
}
tmrs.timePassed = 0;
$cfs.trigger('_cfs_slide_'+eType, [obj, num]);
// synchronise
if (opts.synchronise) {
var s = opts.synchronise,
c = [obj, num];
for (var j = 0, l = s.length; j < l; j++) {
var d = eType;
if (!s[j][1]) c[0] = s[j][0].triggerHandler('_cfs_configuration', eType);
if (!s[j][2]) d = (d == 'prev') ? 'next' : 'prev';
c[1] = num + s[j][3];
s[j][0].trigger('_cfs_slide_'+d, c);
}
}
return true;
});
// prev event, accessible from outside
$cfs.bind(cf_e('_cfs_slide_prev', conf, false), function(e, sO, nI) {
e.stopPropagation();
var a_itm = $cfs.children();
// non-circular at start, scroll to end
if (!opts.circular) {
if (itms.first == 0) {
if (opts.infinite) {
$cfs.trigger(cf_e('next', conf), itms.total-1);
}
return e.stopImmediatePropagation();
}
}
if (opts.usePadding) sz_resetMargin(a_itm, opts);
// find number of items to scroll
if (typeof nI != 'number') {
if (opts.items.visibleConf.variable) {
nI = gn_getVisibleItemsPrev(a_itm, opts, itms.total-1);
} else if (opts.items.filter != '*') {
var xI = (typeof sO.items == 'number') ? sO.items : gn_getVisibleOrg($cfs, opts);
nI = gn_getScrollItemsPrevFilter(a_itm, opts, itms.total-1, xI);
} else {
nI = opts.items.visible;
}
nI = cf_getAdjust(nI, opts, sO.items, $tt0);
}
// prevent non-circular from scrolling to far
if (!opts.circular) {
if (itms.total - nI < itms.first) {
nI = itms.total - itms.first;
}
}
// set new number of visible items
opts.items.visibleConf.old = opts.items.visible;
if (opts.items.visibleConf.variable) {
var vI = gn_getVisibleItemsNext(a_itm, opts, itms.total-nI);
if (opts.items.visible+nI <= vI && nI < itms.total) {
nI++;
vI = gn_getVisibleItemsNext(a_itm, opts, itms.total-nI);
}
opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
} else if (opts.items.filter != '*') {
var vI = gn_getVisibleItemsNextFilter(a_itm, opts, itms.total-nI);
opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
}
if (opts.usePadding) sz_resetMargin(a_itm, opts, true);
// scroll 0, don't scroll
if (nI == 0) {
e.stopImmediatePropagation();
return debug(conf, '0 items to scroll: Not scrolling.');
}
debug(conf, 'Scrolling '+nI+' items backward.');
// save new config
itms.first += nI;
while (itms.first >= itms.total) {
itms.first -= itms.total;
}
// non-circular callback
if (!opts.circular) {
if (itms.first == 0 && sO.onEnd) sO.onEnd.call($tt0);
if (!opts.infinite) nv_enableNavi(opts, itms.first, conf);
}
// rearrange items
$cfs.children().slice(itms.total-nI, itms.total).prependTo($cfs);
if (itms.total < opts.items.visible + nI) {
$cfs.children().slice(0, (opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs);
}
// the needed items
var a_itm = $cfs.children(),
c_old = gi_getOldItemsPrev(a_itm, opts, nI),
c_new = gi_getNewItemsPrev(a_itm, opts),
l_cur = a_itm.eq(nI-1),
l_old = c_old.last(),
l_new = c_new.last();
if (opts.usePadding) sz_resetMargin(a_itm, opts);
if (opts.align) {
var p = cf_getAlignPadding(c_new, opts),
pL = p[0],
pR = p[1];
} else {
var pL = 0,
pR = 0;
}
var oL = (pL < 0) ? opts.padding[opts.d[3]] : 0;
// hide items for fx directscroll
if (sO.fx == 'directscroll' && opts.items.visible < nI) {
var hiddenitems = a_itm.slice(opts.items.visibleConf.old, nI),
orgW = opts.items[opts.d['width']];
hiddenitems.each(function() {
var hi = $(this);
hi.data('isHidden', hi.is(':hidden')).hide();
});
opts.items[opts.d['width']] = 'variable';
} else {
var hiddenitems = false;
}
// save new sizes
var i_siz = ms_getTotalSize(a_itm.slice(0, nI), opts, 'width'),
w_siz = cf_mapWrapperSizes(ms_getSizes(c_new, opts, true), opts, !opts.usePadding);
if (hiddenitems) opts.items[opts.d['width']] = orgW;
if (opts.usePadding) {
sz_resetMargin(a_itm, opts, true);
if (pR >= 0) {
sz_resetMargin(l_old, opts, opts.padding[opts.d[1]]);
}
sz_resetMargin(l_cur, opts, opts.padding[opts.d[3]]);
}
if (opts.align) {
opts.padding[opts.d[1]] = pR;
opts.padding[opts.d[3]] = pL;
}
// animation configuration
var a_cfs = {},
a_dur = sO.duration;
if (sO.fx == 'none') a_dur = 0;
else if (a_dur == 'auto') a_dur = opts.scroll.duration / opts.scroll.items * nI;
else if (a_dur <= 0) a_dur = 0;
else if (a_dur < 10) a_dur = i_siz / a_dur;
scrl = sc_setScroll(a_dur, sO.easing);
// animate wrapper
if (opts[opts.d['width']] == 'variable' || opts[opts.d['height']] == 'variable') {
scrl.anims.push([$wrp, w_siz]);
}
// animate items
if (opts.usePadding) {
var new_m = opts.padding[opts.d[3]];
if (l_new.not(l_cur).length) {
var a_cur = {};
a_cur[opts.d['marginRight']] = l_cur.data('cfs_origCssMargin');
if (pL < 0) l_cur.css(a_cur);
else scrl.anims.push([l_cur, a_cur]);
}
if (l_new.not(l_old).length) {
var a_old = {};
a_old[opts.d['marginRight']] = l_old.data('cfs_origCssMargin');
scrl.anims.push([l_old, a_old]);
}
if (pR >= 0) {
var a_new = {};
a_new[opts.d['marginRight']] = l_new.data('cfs_origCssMargin') + opts.padding[opts.d[1]];
scrl.anims.push([l_new, a_new]);
}
} else {
var new_m = 0;
}
// animate carousel
a_cfs[opts.d['left']] = new_m;
// onBefore callback
var args = [c_old, c_new, w_siz, a_dur];
if (sO.onBefore) sO.onBefore.apply($tt0, args);
clbk.onBefore = sc_callCallbacks(clbk.onBefore, $tt0, args);
// ALTERNATIVE EFFECTS
// extra animation arrays
switch(sO.fx) {
case 'fade':
case 'crossfade':
case 'cover':
case 'uncover':
scrl.pre = sc_setScroll(scrl.duration, scrl.easing);
scrl.post = sc_setScroll(scrl.duration, scrl.easing);
scrl.duration = 0;
break;
}
// create copy
switch(sO.fx) {
case 'crossfade':
case 'cover':
case 'uncover':
var $cf2 = $cfs.clone().appendTo($wrp);
break;
}
switch(sO.fx) {
case 'uncover':
$cf2.children().slice(0, nI).remove();
case 'crossfade':
case 'cover':
$cf2.children().slice(opts.items.visible).remove();
break;
}
// animations
switch(sO.fx) {
case 'fade':
scrl.pre.anims.push([$cfs, { 'opacity': 0 }]);
break;
case 'crossfade':
$cf2.css({ 'opacity': 0 });
scrl.pre.anims.push([$cfs, { 'width': '+=0' }, function() { $cf2.remove(); }]);
scrl.post.anims.push([$cf2, { 'opacity': 1 }]);
break;
case 'cover':
scrl = fx_cover(scrl, $cfs, $cf2, opts, true);
break;
case 'uncover':
scrl = fx_uncover(scrl, $cfs, $cf2, opts, true, nI);
break;
}
// /ALTERNATIVE EFFECTS
// complete callback
var a_complete = function() {
var overFill = opts.items.visible+nI-itms.total;
if (overFill > 0) {
$cfs.children().slice(itms.total).remove();
c_old = $cfs.children().slice(itms.total-(nI-overFill)).get().concat( $cfs.children().slice(0, overFill).get() );
}
if (hiddenitems) {
hiddenitems.each(function() {
var hi = $(this);
if (!hi.data('isHidden')) hi.show();
});
}
if (opts.usePadding) {
var l_itm = $cfs.children().eq(opts.items.visible+nI-1);
l_itm.css(opts.d['marginRight'], l_itm.data('cfs_origCssMargin'));
}
scrl.anims = [];
if (scrl.pre) scrl.pre = sc_setScroll(scrl.orgDuration, scrl.easing);
var fn = function() {
switch(sO.fx) {
case 'fade':
case 'crossfade':
$cfs.css('filter', '');
break;
}
scrl.post = sc_setScroll(0, null);
crsl.isScrolling = false;
var args = [c_old, c_new, w_siz];
if (sO.onAfter) sO.onAfter.apply($tt0, args);
clbk.onAfter = sc_callCallbacks(clbk.onAfter, $tt0, args);
if (queu.length) {
$cfs.trigger(cf_e(queu[0][0], conf), queu[0][1]);
queu.shift();
}
if (!crsl.isPaused) $cfs.trigger(cf_e('play', conf));
};
switch(sO.fx) {
case 'fade':
scrl.pre.anims.push([$cfs, { 'opacity': 1 }, fn]);
sc_startScroll(scrl.pre);
break;
case 'uncover':
scrl.pre.anims.push([$cfs, { 'width': '+=0' }, fn]);
sc_startScroll(scrl.pre);
break;
default:
fn();
break;
}
};
scrl.anims.push([$cfs, a_cfs, a_complete]);
crsl.isScrolling = true;
$cfs.css(opts.d['left'], -(i_siz-oL));
tmrs = sc_clearTimers(tmrs);
sc_startScroll(scrl);
cf_setCookie(opts.cookie, $cfs.triggerHandler(cf_e('currentPosition', conf)));
$cfs.trigger(cf_e('updatePageStatus', conf), [false, w_siz]);
return true;
});
// next event, accessible from outside
$cfs.bind(cf_e('_cfs_slide_next', conf, false), function(e, sO, nI) {
e.stopPropagation();
var a_itm = $cfs.children();
// non-circular at end, scroll to start
if (!opts.circular) {
if (itms.first == opts.items.visible) {
if (opts.infinite) {
$cfs.trigger(cf_e('prev', conf), itms.total-1);
}
return e.stopImmediatePropagation();
}
}
if (opts.usePadding) sz_resetMargin(a_itm, opts);
// find number of items to scroll
if (typeof nI != 'number') {
if (opts.items.filter != '*') {
var xI = (typeof sO.items == 'number') ? sO.items : gn_getVisibleOrg($cfs, opts);
nI = gn_getScrollItemsNextFilter(a_itm, opts, 0, xI);
} else {
nI = opts.items.visible;
}
nI = cf_getAdjust(nI, opts, sO.items, $tt0);
}
var lastItemNr = (itms.first == 0) ? itms.total : itms.first;
// prevent non-circular from scrolling to far
if (!opts.circular) {
if (opts.items.visibleConf.variable) {
var vI = gn_getVisibleItemsNext(a_itm, opts, nI),
xI = gn_getVisibleItemsPrev(a_itm, opts, lastItemNr-1);
} else {
var vI = opts.items.visible,
xI = opts.items.visible;
}
if (nI + vI > lastItemNr) {
nI = lastItemNr - xI;
}
}
// set new number of visible items
opts.items.visibleConf.old = opts.items.visible;
if (opts.items.visibleConf.variable) {
var vI = gn_getVisibleItemsNextTestCircular(a_itm, opts, nI, lastItemNr);
while (opts.items.visible-nI >= vI && nI < itms.total) {
nI++;
vI = gn_getVisibleItemsNextTestCircular(a_itm, opts, nI, lastItemNr);
}
opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
} else if (opts.items.filter != '*') {
var vI = gn_getVisibleItemsNextFilter(a_itm, opts, nI);
opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
}
if (opts.usePadding) sz_resetMargin(a_itm, opts, true);
// scroll 0, don't scroll
if (nI == 0) {
e.stopImmediatePropagation();
return debug(conf, '0 items to scroll: Not scrolling.');
}
debug(conf, 'Scrolling '+nI+' items forward.');
// save new config
itms.first -= nI;
while (itms.first < 0) {
itms.first += itms.total;
}
// non-circular callback
if (!opts.circular) {
if (itms.first == opts.items.visible && sO.onEnd) sO.onEnd.call($tt0);
if (!opts.infinite) nv_enableNavi(opts, itms.first, conf);
}
// rearrange items
if (itms.total < opts.items.visible+nI) {
$cfs.children().slice(0, (opts.items.visible+nI)-itms.total).clone(true).appendTo($cfs);
}
// the needed items
var a_itm = $cfs.children(),
c_old = gi_getOldItemsNext(a_itm, opts),
c_new = gi_getNewItemsNext(a_itm, opts, nI),
l_cur = a_itm.eq(nI-1),
l_old = c_old.last(),
l_new = c_new.last();
if (opts.usePadding) sz_resetMargin(a_itm, opts);
if (opts.align) {
var p = cf_getAlignPadding(c_new, opts),
pL = p[0],
pR = p[1];
} else {
var pL = 0,
pR = 0;
}
// hide items for fx directscroll
if (sO.fx == 'directscroll' && opts.items.visibleConf.old < nI) {
var hiddenitems = a_itm.slice(opts.items.visibleConf.old, nI),
orgW = opts.items[opts.d['width']];
hiddenitems.each(function() {
var hi = $(this);
hi.data('isHidden', hi.is(':hidden')).hide();
});
opts.items[opts.d['width']] = 'variable';
} else {
var hiddenitems = false;
}
// save new sizes
var i_siz = ms_getTotalSize(a_itm.slice(0, nI), opts, 'width'),
w_siz = cf_mapWrapperSizes(ms_getSizes(c_new, opts, true), opts, !opts.usePadding);
if (hiddenitems) opts.items[opts.d['width']] = orgW;
if (opts.align) {
if (opts.padding[opts.d[1]] < 0) {
opts.padding[opts.d[1]] = 0;
}
}
if (opts.usePadding) {
sz_resetMargin(a_itm, opts, true);
sz_resetMargin(l_old, opts, opts.padding[opts.d[1]]);
}
if (opts.align) {
opts.padding[opts.d[1]] = pR;
opts.padding[opts.d[3]] = pL;
}
// animation configuration
var a_cfs = {},
a_dur = sO.duration;
if (sO.fx == 'none') a_dur = 0;
else if (a_dur == 'auto') a_dur = opts.scroll.duration / opts.scroll.items * nI;
else if (a_dur <= 0) a_dur = 0;
else if (a_dur < 10) a_dur = i_siz / a_dur;
scrl = sc_setScroll(a_dur, sO.easing);
// animate wrapper
if (opts[opts.d['width']] == 'variable' || opts[opts.d['height']] == 'variable') {
scrl.anims.push([$wrp, w_siz]);
}
// animate items
if (opts.usePadding) {
var l_new_m = l_new.data('cfs_origCssMargin');
if (pR >= 0) {
l_new_m += opts.padding[opts.d[1]];
}
l_new.css(opts.d['marginRight'], l_new_m);
if (l_cur.not(l_old).length) {
var a_old = {};
a_old[opts.d['marginRight']] = l_old.data('cfs_origCssMargin');
scrl.anims.push([l_old, a_old]);
}
var c_new_m = l_cur.data('cfs_origCssMargin');
if (pL >= 0) {
c_new_m += opts.padding[opts.d[3]];
}
var a_cur = {};
a_cur[opts.d['marginRight']] = c_new_m;
scrl.anims.push([l_cur, a_cur]);
}
// animate carousel
a_cfs[opts.d['left']] = -i_siz;
if (pL < 0) {
a_cfs[opts.d['left']] += pL;
}
// onBefore callback
var args = [c_old, c_new, w_siz, a_dur];
if (sO.onBefore) sO.onBefore.apply($tt0, args);
clbk.onBefore = sc_callCallbacks(clbk.onBefore, $tt0, args);
// ALTERNATIVE EFFECTS
// extra animation arrays
switch(sO.fx) {
case 'fade':
case 'crossfade':
case 'cover':
case 'uncover':
scrl.pre = sc_setScroll(scrl.duration, scrl.easing);
scrl.post = sc_setScroll(scrl.duration, scrl.easing);
scrl.duration = 0;
break;
}
// create copy
switch(sO.fx) {
case 'crossfade':
case 'cover':
case 'uncover':
var $cf2 = $cfs.clone().appendTo($wrp);
break;
}
switch(sO.fx) {
case 'uncover':
$cf2.children().slice(opts.items.visibleConf.old).remove();
break;
case 'crossfade':
case 'cover':
$cf2.children().slice(0, nI).remove();
$cf2.children().slice(opts.items.visible).remove();
break;
}
// animations
switch(sO.fx) {
case 'fade':
scrl.pre.anims.push([$cfs, { 'opacity': 0 }]);
break;
case 'crossfade':
$cf2.css({ 'opacity': 0 });
scrl.pre.anims.push([$cfs, { 'width': '+=0' }, function() { $cf2.remove(); }]);
scrl.post.anims.push([$cf2, { 'opacity': 1 }]);
break;
case 'cover':
scrl = fx_cover(scrl, $cfs, $cf2, opts, false);
break;
case 'uncover':
scrl = fx_uncover(scrl, $cfs, $cf2, opts, false, nI);
break;
}
// /ALTERNATIVE EFFECTS
// complete callback
var a_complete = function() {
var overFill = opts.items.visible+nI-itms.total,
new_m = (opts.usePadding) ? opts.padding[opts.d[3]] : 0;
$cfs.css(opts.d['left'], new_m);
if (overFill > 0) {
$cfs.children().slice(itms.total).remove();
}
var l_itm = $cfs.children().slice(0, nI).appendTo($cfs).last();
if (overFill > 0) {
c_new = gi_getCurrentItems(a_itm, opts);
}
if (hiddenitems) {
hiddenitems.each(function() {
var hi = $(this);
if (!hi.data('isHidden')) hi.show();
});
}
if (opts.usePadding) {
if (itms.total < opts.items.visible+nI) {
var l_cur = $cfs.children().eq(opts.items.visible-1);
l_cur.css(opts.d['marginRight'], l_cur.data('cfs_origCssMargin') + opts.padding[opts.d[3]]);
}
l_itm.css(opts.d['marginRight'], l_itm.data('cfs_origCssMargin'));
}
scrl.anims = [];
if (scrl.pre) scrl.pre = sc_setScroll(scrl.orgDuration, scrl.easing);
var fn = function() {
switch(sO.fx) {
case 'fade':
case 'crossfade':
$cfs.css('filter', '');
break;
}
scrl.post = sc_setScroll(0, null);
crsl.isScrolling = false;
var args = [c_old, c_new, w_siz];
if (sO.onAfter) sO.onAfter.apply($tt0, args);
clbk.onAfter = sc_callCallbacks(clbk.onAfter, $tt0, args);
if (queu.length) {
$cfs.trigger(cf_e(queu[0][0], conf), queu[0][1]);
queu.shift();
}
if (!crsl.isPaused) $cfs.trigger(cf_e('play', conf));
};
switch(sO.fx) {
case 'fade':
scrl.pre.anims.push([$cfs, { 'opacity': 1 }, fn]);
sc_startScroll(scrl.pre);
break;
case 'uncover':
scrl.pre.anims.push([$cfs, { 'width': '+=0' }, fn]);
sc_startScroll(scrl.pre);
break;
default:
fn();
break;
}
};
scrl.anims.push([$cfs, a_cfs, a_complete]);
crsl.isScrolling = true;
tmrs = sc_clearTimers(tmrs);
sc_startScroll(scrl);
cf_setCookie(opts.cookie, $cfs.triggerHandler(cf_e('currentPosition', conf)));
$cfs.trigger(cf_e('updatePageStatus', conf), [false, w_siz]);
return true;
});
// slideTo event
$cfs.bind(cf_e('slideTo', conf), function(e, num, dev, org, obj, dir, clb) {
e.stopPropagation();
var v = [num, dev, org, obj, dir, clb],
t = ['string/number/object', 'number', 'boolean', 'object', 'string', 'function'],
a = cf_sortParams(v, t);
var obj = a[3],
dir = a[4],
clb = a[5];
num = gn_getItemIndex(a[0], a[1], a[2], itms, $cfs);
if (num == 0) return;
if (typeof obj != 'object') obj = false;
if (crsl.isScrolling) {
if (typeof obj != 'object' || obj.duration > 0) return false;
}
if (dir != 'prev' && dir != 'next') {
if (opts.circular) {
if (num <= itms.total / 2) dir = 'next';
else dir = 'prev';
} else {
if (itms.first == 0 ||
itms.first > num) dir = 'next';
else dir = 'prev';
}
}
if (dir == 'prev') num = itms.total-num;
$cfs.trigger(cf_e(dir, conf), [obj, num, clb]);
return true;
});
// prevPage event
$cfs.bind(cf_e('prevPage', conf), function(e, obj, clb) {
e.stopPropagation();
var cur = $cfs.triggerHandler(cf_e('currentPage', conf));
return $cfs.triggerHandler(cf_e('slideToPage', conf), [cur-1, obj, 'prev', clb]);
});
// nextPage event
$cfs.bind(cf_e('nextPage', conf), function(e, obj, clb) {
e.stopPropagation();
var cur = $cfs.triggerHandler(cf_e('currentPage', conf));
return $cfs.triggerHandler(cf_e('slideToPage', conf), [cur+1, obj, 'next', clb]);
});
// slideToPage event
$cfs.bind(cf_e('slideToPage', conf), function(e, pag, obj, dir, clb) {
e.stopPropagation();
if (typeof pag != 'number') pag = $cfs.triggerHandler(cf_e('currentPage', conf));
var ipp = opts.pagination.items || opts.items.visible,
max = Math.floor(itms.total / ipp)-1;
if (pag < 0) pag = max;
if (pag > max) pag = 0;
return $cfs.triggerHandler(cf_e('slideTo', conf), [pag*ipp, 0, true, obj, dir, clb]);
});
// jumpToStart event
$cfs.bind(cf_e('jumpToStart', conf), function(e, s) {
e.stopPropagation();
if (s) s = gn_getItemIndex(s, 0, true, itms, $cfs);
else s = 0;
s += itms.first;
if (s != 0) {
while (s > itms.total) s -= itms.total;
$cfs.prepend($cfs.children().slice(s, itms.total));
}
return true;
});
// synchronise event
$cfs.bind(cf_e('synchronise', conf), function(e, s) {
e.stopPropagation();
if (s) s = cf_getSynchArr(s);
else if (opts.synchronise) s = opts.synchronise;
else return debug(conf, 'No carousel to synchronise.');
var n = $cfs.triggerHandler(cf_e('currentPosition', conf)),
x = true;
for (var j = 0, l = s.length; j < l; j++) {
if (!s[j][0].triggerHandler(cf_e('slideTo', conf), [n, s[j][3], true])) {
x = false;
}
}
return x;
});
// queue event
$cfs.bind(cf_e('queue', conf), function(e, dir, opt) {
e.stopPropagation();
if (typeof dir == 'function') {
dir.call($tt0, queu);
} else if (is_array(dir)) {
queu = dir;
} else if (typeof dir != 'undefined') {
queu.push([dir, opt]);
}
return queu;
});
// insertItem event
$cfs.bind(cf_e('insertItem', conf), function(e, itm, num, org, dev) {
e.stopPropagation();
var v = [itm, num, org, dev],
t = ['string/object', 'string/number/object', 'boolean', 'number'],
a = cf_sortParams(v, t);
var itm = a[0],
num = a[1],
org = a[2],
dev = a[3];
if (typeof itm == 'object' &&
typeof itm.jquery == 'undefined') itm = $(itm);
if (typeof itm == 'string') itm = $(itm);
if (typeof itm != 'object' ||
typeof itm.jquery == 'undefined' ||
itm.length == 0) return debug(conf, 'Not a valid object.');
if (typeof num == 'undefined') num = 'end';
if (opts.usePadding) {
itm.each(function() {
var m = parseInt($(this).css(opts.d['marginRight']));
if (isNaN(m)) m = 0;
$(this).data('cfs_origCssMargin', m);
});
}
var orgNum = num,
before = 'before';
if (num == 'end') {
if (org) {
if (itms.first == 0) {
num = itms.total-1;
before = 'after';
} else {
num = itms.first;
itms.first += itm.length
}
if (num < 0) num = 0;
} else {
num = itms.total-1;
before = 'after';
}
} else {
num = gn_getItemIndex(num, dev, org, itms, $cfs);
}
if (orgNum != 'end' && !org) {
if (num < itms.first) itms.first += itm.length;
}
if (itms.first >= itms.total) itms.first -= itms.total;
var $cit = $cfs.children().eq(num);
if ($cit.length) {
$cit[before](itm);
} else {
$cfs.append(itm);
}
itms.total = $cfs.children().length;
var sz = $cfs.triggerHandler('updateSizes');
nv_showNavi(opts, itms.total, conf);
nv_enableNavi(opts, itms.first, conf);
$cfs.trigger(cf_e('linkAnchors', conf));
$cfs.trigger(cf_e('updatePageStatus', conf), [true, sz]);
return true;
});
// removeItem event
$cfs.bind(cf_e('removeItem', conf), function(e, num, org, dev) {
e.stopPropagation();
var v = [num, org, dev],
t = ['string/number/object', 'boolean', 'number'],
a = cf_sortParams(v, t);
var num = a[0],
org = a[1],
dev = a[2];
if (typeof num == 'undefined' || num == 'end') {
$cfs.children().last().remove();
} else {
num = gn_getItemIndex(num, dev, org, itms, $cfs);
var $cit = $cfs.children().eq(num);
if ($cit.length){
if (num < itms.first) itms.first -= $cit.length;
$cit.remove();
}
}
itms.total = $cfs.children().length;
var sz = $cfs.triggerHandler('updateSizes');
nv_showNavi(opts, itms.total, conf);
nv_enableNavi(opts, itms.first, conf);
$cfs.trigger(cf_e('updatePageStatus', conf), [true, sz]);
return true;
});
// onBefore and onAfter event
$cfs.bind(cf_e('onBefore', conf)+' '+cf_e('onAfter', conf), function(e, fn) {
e.stopPropagation();
var eType = e.type.substr(conf.events.prefix.length);
if (is_array(fn)) clbk[eType] = fn;
if (typeof fn == 'function') clbk[eType].push(fn);
return clbk[eType];
});
// currentPosition event, accessible from outside
$cfs.bind(cf_e('_cfs_currentPosition', conf, false), function(e, fn) {
e.stopPropagation();
return $cfs.triggerHandler(cf_e('currentPosition', conf), fn);
});
$cfs.bind(cf_e('currentPosition', conf), function(e, fn) {
e.stopPropagation();
if (itms.first == 0) var val = 0;
else var val = itms.total - itms.first;
if (typeof fn == 'function') fn.call($tt0, val);
return val;
});
// currentPage event
$cfs.bind(cf_e('currentPage', conf), function(e, fn) {
e.stopPropagation();
var ipp = opts.pagination.items || opts.items.visible;
var max = Math.ceil(itms.total/ipp-1);
if (itms.first == 0) var nr = 0;
else if (itms.first < itms.total % ipp) var nr = 0;
else if (itms.first == ipp && !opts.circular) var nr = max;
else var nr = Math.round((itms.total-itms.first)/ipp);
if (nr < 0) nr = 0;
if (nr > max) nr = max;
if (typeof fn == 'function') fn.call($tt0, nr);
return nr;
});
// currentVisible event
$cfs.bind(cf_e('currentVisible', conf), function(e, fn) {
e.stopPropagation();
$i = gi_getCurrentItems($cfs.children(), opts);
if (typeof fn == 'function') fn.call($tt0, $i);
return $i;
});
// slice event
$cfs.bind(cf_e('slice', conf), function(e, f, l, fn) {
e.stopPropagation();
var v = [f, l, fn],
t = ['number', 'number', 'function'],
a = cf_sortParams(v, t);
f = (typeof a[0] == 'number') ? a[0] : 0,
l = (typeof a[1] == 'number') ? a[1] : itms.total,
fn = a[2];
f += itms.first;
l += itms.first;
while (f > itms.total) { f -= itms.total }
while (l > itms.total) { l -= itms.total }
while (f < 0) { f += itms.total }
while (l < 0) { l += itms.total }
var $iA = $cfs.children();
if (l > f) {
var $i = $iA.slice(f, l);
} else {
var $i = $iA.slice(f, itms.total).get().concat( $iA.slice(0, l).get() );
}
if (typeof fn == 'function') fn.call($tt0, $i);
return $i;
});
// isPaused, isStopped and isScrolling events
$cfs.bind(cf_e('isPaused', conf)+' '+cf_e('isStopped', conf)+' '+cf_e('isScrolling', conf), function(e, fn) {
e.stopPropagation();
var eType = e.type.substr(conf.events.prefix.length);
if (typeof fn == 'function') fn.call($tt0, crsl[eType]);
return crsl[eType];
});
// configuration event, accessible from outside
$cfs.bind(cf_e('_cfs_configuration', conf, false), function(e, a, b, c) {
e.stopPropagation();
return $cfs.triggerHandler(cf_e('configuration', conf), [a, b, c]);
});
$cfs.bind(cf_e('configuration', conf), function(e, a, b, c) {
e.stopPropagation();
var reInit = false;
// return entire configuration-object
if (typeof a == 'function') {
a.call($tt0, opts);
// set multiple options via object
} else if (typeof a == 'object') {
opts_orig = $.extend(true, {}, opts_orig, a);
if (b !== false) reInit = true;
else opts = $.extend(true, {}, opts, a);
} else if (typeof a != 'undefined') {
// callback function for specific option
if (typeof b == 'function') {
var val = eval('opts.'+a);
if (typeof val == 'undefined') val = '';
b.call($tt0, val);
// set individual option
} else if (typeof b != 'undefined') {
if (typeof c !== 'boolean') c = true;
eval('opts_orig.'+a+' = b');
if (c !== false) reInit = true;
else eval('opts.'+a+' = b');
// return value for specific option
} else {
return eval('opts.'+a);
}
}
if (reInit) {
sz_resetMargin($cfs.children(), opts);
$cfs._cfs_init(opts_orig);
$cfs._cfs_bind_buttons();
var siz = sz_setSizes($cfs, opts, false);
$cfs.trigger(cf_e('updatePageStatus', conf), [true, siz]);
}
return opts;
});
// linkAnchors event
$cfs.bind(cf_e('linkAnchors', conf), function(e, $con, sel) {
e.stopPropagation();
if (typeof $con == 'undefined' || $con.length == 0) $con = $('body');
else if (typeof $con == 'string') $con = $($con);
if (typeof $con != 'object') return debug(conf, 'Not a valid object.');
if (typeof sel != 'string' || sel.length == 0) sel = 'a.caroufredsel';
$con.find(sel).each(function() {
var h = this.hash || '';
if (h.length > 0 && $cfs.children().index($(h)) != -1) {
$(this).unbind('click').click(function(e) {
e.preventDefault();
$cfs.trigger(cf_e('slideTo', conf), h);
});
}
});
return true;
});
// updatePageStatus event
$cfs.bind(cf_e('updatePageStatus', conf), function(e, build, sizes) {
e.stopPropagation();
if (!opts.pagination.container) return;
if (build) {
var ipp = opts.pagination.items || opts.items.visible,
l = Math.ceil(itms.total/ipp);
if (opts.pagination.anchorBuilder) {
opts.pagination.container.children().remove();
opts.pagination.container.each(function() {
for (var a = 0; a < l; a++) {
var i = $cfs.children().eq( gn_getItemIndex(a*ipp, 0, true, itms, $cfs) );
$(this).append(opts.pagination.anchorBuilder(a+1, i));
}
});
}
opts.pagination.container.each(function() {
$(this).children().unbind(opts.pagination.event).each(function(a) {
$(this).bind(opts.pagination.event, function(e) {
e.preventDefault();
$cfs.trigger(cf_e('slideTo', conf), [a*ipp, 0, true, opts.pagination]);
});
});
});
}
opts.pagination.container.each(function() {
$(this).children().removeClass(cf_c('selected', conf)).eq($cfs.triggerHandler(cf_e('currentPage', conf))).addClass(cf_c('selected', conf));
});
return true;
});
// updateSizes event
$cfs.bind(cf_e('updateSizes', conf), function(e) {
var a_itm = $cfs.children(),
vI = opts.items.visible;
if (opts.items.visibleConf.variable) vI = gn_getVisibleItemsNext(a_itm, opts, 0);
else if (opts.items.filter != '*') vI = gn_getVisibleItemsNextFilter(a_itm, opts, 0);
if (!opts.circular && itms.first != 0 && vI > itms.first) {
if (opts.items.visibleConf.variable) {
var nI = gn_getVisibleItemsPrev(a_itm, opts, itms.first) - itms.first;
} else if (opts.items.filter != '*') {
var nI = gn_getVisibleItemsPrevFilter(a_itm, opts, itms.first) - itms.first;
} else {
nI = opts.items.visible - itms.first;
}
debug(conf, 'Preventing non-circular: sliding '+nI+' items backward.');
$cfs.trigger('prev', nI);
}
opts.items.visible = cf_getItemsAdjust(vI, opts, opts.items.visibleConf.adjust, $tt0);
return sz_setSizes($cfs, opts);
});
// destroy event, accessible from outside
$cfs.bind(cf_e('_cfs_destroy', conf, false), function(e, orgOrder) {
e.stopPropagation();
$cfs.trigger(cf_e('destroy', conf), orgOrder);
return true;
});
$cfs.bind(cf_e('destroy', conf), function(e, orgOrder) {
e.stopPropagation();
tmrs = sc_clearTimers(tmrs);
$cfs.data('cfs_isCarousel', false);
$cfs.trigger(cf_e('finish', conf));
if (orgOrder) {
$cfs.trigger(cf_e('jumpToStart', conf));
}
if (opts.usePadding) {
sz_resetMargin($cfs.children(), opts);
}
$cfs.css($cfs.data('cfs_origCss'));
$cfs._cfs_unbind_events();
$cfs._cfs_unbind_buttons();
$wrp.replaceWith($cfs);
return true;
});
}; // /bind_events
$cfs._cfs_unbind_events = function() {
$cfs.unbind(cf_e('', conf));
$cfs.unbind(cf_e('', conf, false));
}; // /unbind_events
$cfs._cfs_bind_buttons = function() {
$cfs._cfs_unbind_buttons();
nv_showNavi(opts, itms.total, conf);
nv_enableNavi(opts, itms.first, conf);
if (opts.auto.pauseOnHover) {
var pC = bt_pauseOnHoverConfig(opts.auto.pauseOnHover);
$wrp.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
.bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
}
if (opts.auto.button) {
opts.auto.button.bind(cf_e(opts.auto.event, conf, false), function(e) {
e.preventDefault();
var ev = false,
pC = null;
if (crsl.isPaused) {
ev = 'play';
} else if (opts.auto.pauseOnEvent) {
ev = 'pause';
pC = bt_pauseOnHoverConfig(opts.auto.pauseOnEvent);
}
if (ev) {
$cfs.trigger(cf_e(ev, conf), pC);
}
});
}
if (opts.prev.button) {
opts.prev.button.bind(cf_e(opts.prev.event, conf, false), function(e) {
e.preventDefault();
$cfs.trigger(cf_e('prev', conf));
});
if (opts.prev.pauseOnHover) {
var pC = bt_pauseOnHoverConfig(opts.prev.pauseOnHover);
opts.prev.button.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
.bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
}
}
if (opts.next.button) {
opts.next.button.bind(cf_e(opts.next.event, conf, false), function(e) {
e.preventDefault();
$cfs.trigger(cf_e('next', conf));
});
if (opts.next.pauseOnHover) {
var pC = bt_pauseOnHoverConfig(opts.next.pauseOnHover);
opts.next.button.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
.bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
}
}
if ($.fn.mousewheel) {
if (opts.prev.mousewheel) {
if (!crsl.mousewheelPrev) {
crsl.mousewheelPrev = true;
$wrp.mousewheel(function(e, delta) {
if (delta > 0) {
e.preventDefault();
var num = bt_mousesheelNumber(opts.prev.mousewheel);
$cfs.trigger(cf_e('prev', conf), num);
}
});
}
}
if (opts.next.mousewheel) {
if (!crsl.mousewheelNext) {
crsl.mousewheelNext = true;
$wrp.mousewheel(function(e, delta) {
if (delta < 0) {
e.preventDefault();
var num = bt_mousesheelNumber(opts.next.mousewheel);
$cfs.trigger(cf_e('next', conf), num);
}
});
}
}
}
if ($.fn.touchwipe) {
var wP = (opts.prev.wipe) ? function() { $cfs.trigger(cf_e('prev', conf)) } : null,
wN = (opts.next.wipe) ? function() { $cfs.trigger(cf_e('next', conf)) } : null;
if (wN || wN) {
if (!crsl.touchwipe) {
crsl.touchwipe = true;
var twOps = {
'min_move_x': 30,
'min_move_y': 30,
'preventDefaultEvents': true
};
switch (opts.direction) {
case 'up':
case 'down':
twOps.wipeUp = wN;
twOps.wipeDown = wP;
break;
default:
twOps.wipeLeft = wN;
twOps.wipeRight = wP;
}
$wrp.touchwipe(twOps);
}
}
}
if (opts.pagination.container) {
if (opts.pagination.pauseOnHover) {
var pC = bt_pauseOnHoverConfig(opts.pagination.pauseOnHover);
opts.pagination.container.bind(cf_e('mouseenter', conf, false), function() { $cfs.trigger(cf_e('pause', conf), pC); })
.bind(cf_e('mouseleave', conf, false), function() { $cfs.trigger(cf_e('resume', conf)); });
}
}
if (opts.prev.key || opts.next.key) {
$(document).bind(cf_e('keyup', conf, false, true, true), function(e) {
var k = e.keyCode;
if (k == opts.next.key) {
e.preventDefault();
$cfs.trigger(cf_e('next', conf));
}
if (k == opts.prev.key) {
e.preventDefault();
$cfs.trigger(cf_e('prev', conf));
}
});
}
if (opts.pagination.keys) {
$(document).bind(cf_e('keyup', conf, false, true, true), function(e) {
var k = e.keyCode;
if (k >= 49 && k < 58) {
k = (k-49) * opts.items.visible;
if (k <= itms.total) {
e.preventDefault();
$cfs.trigger(cf_e('slideTo', conf), [k, 0, true, opts.pagination]);
}
}
});
}
if (opts.auto.play) {
$cfs.trigger(cf_e('play', conf), opts.auto.delay);
}
if (crsl.upDateOnWindowResize) {
$(window).bind(cf_e('resize', conf, false, true, true), function(e) {
$cfs.trigger(cf_e('finish', conf));
if (opts.auto.pauseOnResize && !crsl.isPaused) {
$cfs.trigger(cf_e('play', conf));
}
sz_resetMargin($cfs.children(), opts);
$cfs._cfs_init(opts_orig);
var siz = sz_setSizes($cfs, opts, false);
$cfs.trigger(cf_e('updatePageStatus', conf), [true, siz]);
});
}
}; // /bind_buttons
$cfs._cfs_unbind_buttons = function() {
var ns1 = cf_e('', conf),
ns2 = cf_e('', conf, false);
ns3 = cf_e('', conf, false, true, true);
$(document).unbind(ns3);
$(window).unbind(ns3);
$wrp.unbind(ns2);
if (opts.auto.button) opts.auto.button.unbind(ns2);
if (opts.prev.button) opts.prev.button.unbind(ns2);
if (opts.next.button) opts.next.button.unbind(ns2);
if (opts.pagination.container) {
opts.pagination.container.unbind(ns2);
if (opts.pagination.anchorBuilder) {
opts.pagination.container.children().remove();
}
}
nv_showNavi(opts, 'hide', conf);
nv_enableNavi(opts, 'removeClass', conf);
}; // /unbind_buttons
// START
var crsl = {
'direction' : 'next',
'isPaused' : true,
'isScrolling' : false,
'isStopped' : false,
'mousewheelNext': false,
'mousewheelPrev': false,
'touchwipe' : false
},
itms = {
'total' : $cfs.children().length,
'first' : 0
},
tmrs = {
'timer' : null,
'auto' : null,
'queue' : null,
'startTime' : getTime(),
'timePassed' : 0
},
scrl = {
'isStopped' : false,
'duration' : 0,
'startTime' : 0,
'easing' : '',
'anims' : []
},
clbk = {
'onBefore' : [],
'onAfter' : []
},
queu = [],
conf = $.extend(true, {}, $.fn.carouFredSel.configs, configs),
opts = {},
opts_orig = options,
$wrp = $cfs.wrap('<'+conf.wrapper.element+' class="'+conf.wrapper.classname+'" />').parent();
conf.selector = $cfs.selector;
conf.serialNumber = $.fn.carouFredSel.serialNumber++;
// create carousel
$cfs._cfs_init(opts_orig, true, starting_position);
$cfs._cfs_build();
$cfs._cfs_bind_events();
$cfs._cfs_bind_buttons();
// find item to start
if (is_array(opts.items.start)) {
var start_arr = opts.items.start;
} else {
var start_arr = [];
if (opts.items.start != 0) {
start_arr.push(opts.items.start);
}
}
if (opts.cookie) {
start_arr.unshift(cf_readCookie(opts.cookie));
}
if (start_arr.length > 0) {
for (var a = 0, l = start_arr.length; a < l; a++) {
var s = start_arr[a];
if (s == 0) {
continue;
}
if (s === true) {
s = window.location.hash;
if (s.length < 1) {
continue;
}
} else if (s === 'random') {
s = Math.floor(Math.random()*itms.total);
}
if ($cfs.triggerHandler(cf_e('slideTo', conf), [s, 0, true, { fx: 'none' }])) {
break;
}
}
}
var siz = sz_setSizes($cfs, opts, false),
itm = gi_getCurrentItems($cfs.children(), opts);
if (opts.onCreate) {
opts.onCreate.call($tt0, itm, siz);
}
$cfs.trigger(cf_e('updatePageStatus', conf), [true, siz]);
$cfs.trigger(cf_e('linkAnchors', conf));
return $cfs;
};
// GLOBAL PUBLIC
$.fn.carouFredSel.serialNumber = 1;
$.fn.carouFredSel.defaults = {
'synchronise' : false,
'infinite' : true,
'circular' : true,
'responsive' : false,
'direction' : 'left',
'items' : {
'start' : 0
},
'scroll' : {
'easing' : 'swing',
'duration' : 500,
'pauseOnHover' : false,
'mousewheel' : false,
'wipe' : false,
'event' : 'click',
'queue' : false
}
};
$.fn.carouFredSel.configs = {
'debug' : false,
'events' : {
'prefix' : '',
'namespace' : 'cfs'
},
'wrapper' : {
'element' : 'div',
'classname' : 'caroufredsel_wrapper'
},
'classnames' : {}
};
$.fn.carouFredSel.pageAnchorBuilder = function(nr, itm) {
return '<a href="#"><span>'+nr+'</span></a>';
};
// GLOBAL PRIVATE
// scrolling functions
function sc_setScroll(d, e) {
return {
anims : [],
duration : d,
orgDuration : d,
easing : e,
startTime : getTime()
};
}
function sc_startScroll(s) {
if (typeof s.pre == 'object') {
sc_startScroll(s.pre);
}
for (var a = 0, l = s.anims.length; a < l; a++) {
var b = s.anims[a];
if (!b) continue;
if (b[3]) b[0].stop();
b[0].animate(b[1], {
complete: b[2],
duration: s.duration,
easing: s.easing
});
}
if (typeof s.post == 'object') {
sc_startScroll(s.post);
}
}
function sc_stopScroll(s, finish) {
if (typeof finish != 'boolean') finish = true;
if (typeof s.pre == 'object') {
sc_stopScroll(s.pre, finish);
}
for (var a = 0, l = s.anims.length; a < l; a++) {
var b = s.anims[a];
b[0].stop(true);
if (finish) {
b[0].css(b[1]);
if (typeof b[2] == 'function') b[2]();
}
}
if (typeof s.post == 'object') {
sc_stopScroll(s.post, finish);
}
}
function sc_clearTimers(t) {
if (t.auto) clearTimeout(t.auto);
return t;
}
function sc_callCallbacks(cbs, t, args) {
if (cbs.length) {
for (var a = 0, l = cbs.length; a < l; a++) {
cbs[a].apply(t, args);
}
}
return [];
}
// fx functions
function fx_fade(sO, c, x, d, f) {
var o = {
'duration' : d,
'easing' : sO.easing
};
if (typeof f == 'function') o.complete = f;
c.animate({
opacity: x
}, o);
}
function fx_cover(sc, c1, c2, o, prev) {
var old_w = ms_getSizes(gi_getOldItemsNext(c1.children(), o), o, true)[0],
new_w = ms_getSizes(c2.children(), o, true)[0],
cur_l = (prev) ? -new_w : old_w,
css_o = {},
ani_o = {};
css_o[o.d['width']] = new_w;
css_o[o.d['left']] = cur_l;
ani_o[o.d['left']] = 0;
sc.pre.anims.push([c1, { 'opacity': 1 }]);
sc.post.anims.push([c2, ani_o, function() { $(this).remove(); }]);
c2.css(css_o);
return sc;
}
function fx_uncover(sc, c1, c2, o, prev, n) {
var new_w = ms_getSizes(gi_getNewItemsNext(c1.children(), o, n), o, true)[0],
old_w = ms_getSizes(c2.children(), o, true)[0],
cur_l = (prev) ? -old_w : new_w,
css_o = {},
ani_o = {};
css_o[o.d['width']] = old_w;
css_o[o.d['left']] = 0;
ani_o[o.d['left']] = cur_l;
sc.post.anims.push([c2, ani_o, function() { $(this).remove(); }]);
c2.css(css_o);
return sc;
}
// navigation functions
function nv_showNavi(o, t, c) {
if (t == 'show' || t == 'hide') {
var f = t;
} else if (o.items.minimum >= t) {
debug(c, 'Not enough items: hiding navigation ('+t+' items, '+o.items.minimum+' needed).');
var f = 'hide';
} else {
var f = 'show';
}
var s = (f == 'show') ? 'removeClass' : 'addClass',
h = cf_c('hidden', c);
if (o.auto.button) o.auto.button[f]()[s](h);
if (o.prev.button) o.prev.button[f]()[s](h);
if (o.next.button) o.next.button[f]()[s](h);
if (o.pagination.container) o.pagination.container[f]()[s](h);
}
function nv_enableNavi(o, f, c) {
if (o.circular || o.infinite) return;
var fx = (f == 'removeClass' || f == 'addClass') ? f : false,
di = cf_c('disabled', c);
if (o.auto.button && fx) {
o.auto.button[fx](di);
}
if (o.prev.button) {
var fn = fx || (f == 0) ? 'addClass' : 'removeClass';
o.prev.button[fn](di);
}
if (o.next.button) {
var fn = fx || (f == o.items.visible) ? 'addClass' : 'removeClass';
o.next.button[fn](di);
}
}
// get object functions
function go_getObject($tt, obj) {
if (typeof obj == 'function') obj = obj.call($tt);
if (typeof obj == 'undefined') obj = {};
return obj;
}
function go_getNaviObject($tt, obj, type) {
if (typeof type != 'string') type = '';
obj = go_getObject($tt, obj);
if (typeof obj == 'string') {
var temp = cf_getKeyCode(obj);
if (temp == -1) obj = $(obj);
else obj = temp;
}
// pagination
if (type == 'pagination') {
if (typeof obj == 'boolean') obj = { 'keys': obj };
if (typeof obj.jquery != 'undefined') obj = { 'container': obj };
if (typeof obj.container == 'function') obj.container = obj.container.call($tt);
if (typeof obj.container == 'string') obj.container = $(obj.container);
if (typeof obj.items != 'number') obj.items = false;
// auto
} else if (type == 'auto') {
if (typeof obj.jquery != 'undefined') obj = { 'button': obj };
if (typeof obj == 'boolean') obj = { 'play': obj };
if (typeof obj == 'number') obj = { 'pauseDuration': obj };
if (typeof obj.button == 'function') obj.button = obj.button.call($tt);
if (typeof obj.button == 'string') obj.button = $(obj.button);
// prev + next
} else {
if (typeof obj.jquery != 'undefined') obj = { 'button': obj };
if (typeof obj == 'number') obj = { 'key': obj };
if (typeof obj.button == 'function') obj.button = obj.button.call($tt);
if (typeof obj.button == 'string') obj.button = $(obj.button);
if (typeof obj.key == 'string') obj.key = cf_getKeyCode(obj.key);
}
return obj;
}
// get number functions
function gn_getItemIndex(num, dev, org, items, $cfs) {
if (typeof num == 'string') {
if (isNaN(num)) num = $(num);
else num = parseInt(num);
}
if (typeof num == 'object') {
if (typeof num.jquery == 'undefined') num = $(num);
num = $cfs.children().index(num);
if (num == -1) num = 0;
if (typeof org != 'boolean') org = false;
} else {
if (typeof org != 'boolean') org = true;
}
if (isNaN(num)) num = 0;
else num = parseInt(num);
if (isNaN(dev)) dev = 0;
else dev = parseInt(dev);
if (org) {
num += items.first;
}
num += dev;
if (items.total > 0) {
while (num >= items.total) { num -= items.total; }
while (num < 0) { num += items.total; }
}
return num;
}
// items prev
function gn_getVisibleItemsPrev(i, o, s) {
var t = 0,
x = 0;
for (var a = s; a >= 0; a--) {
var j = i.eq(a);
t += (j.is(':visible')) ? j[o.d['outerWidth']](true) : 0;
if (t > o.maxDimention) return x;
if (a == 0) a = i.length;
x++;
}
}
function gn_getVisibleItemsPrevFilter(i, o, s) {
return gn_getItemsPrevFilter(i, o.items.filter, o.items.visibleConf.org, s);
}
function gn_getScrollItemsPrevFilter(i, o, s, m) {
return gn_getItemsPrevFilter(i, o.items.filter, m, s);
}
function gn_getItemsPrevFilter(i, f, m, s) {
var t = 0,
x = 0;
for (var a = s, l = i.length-1; a >= 0; a--) {
x++;
if (x == l) return x;
var j = i.eq(a);
if (j.is(f)) {
t++;
if (t == m) return x;
}
if (a == 0) a = i.length;
}
}
function gn_getVisibleOrg($c, o) {
return o.items.visibleConf.org || $c.children().slice(0, o.items.visible).filter(o.items.filter).length;
}
// items next
function gn_getVisibleItemsNext(i, o, s) {
var t = 0,
x = 0;
for (var a = s, l = i.length-1; a <= l; a++) {
var j = i.eq(a);
t += (j.is(':visible')) ? j[o.d['outerWidth']](true) : 0;
if (t > o.maxDimention) return x;
x++;
if (x == l) return x;
if (a == l) a = -1;
}
}
function gn_getVisibleItemsNextTestCircular(i, o, s, l) {
var v = gn_getVisibleItemsNext(i, o, s);
if (!o.circular) {
if (s + v > l) v = l - s;
}
return v;
}
function gn_getVisibleItemsNextFilter(i, o, s) {
return gn_getItemsNextFilter(i, o.items.filter, o.items.visibleConf.org, s, o.circular);
}
function gn_getScrollItemsNextFilter(i, o, s, m) {
return gn_getItemsNextFilter(i, o.items.filter, m+1, s, o.circular) - 1;
}
function gn_getItemsNextFilter(i, f, m, s, c) {
var t = 0,
x = 0;
for (var a = s, l = i.length-1; a <= l; a++) {
x++;
if (x == l) return x;
var j = i.eq(a);
if (j.is(f)) {
t++;
if (t == m) return x;
}
if (a == l) a = -1;
}
}
// get items functions
function gi_getCurrentItems(i, o) {
return i.slice(0, o.items.visible);
}
function gi_getOldItemsPrev(i, o, n) {
return i.slice(n, o.items.visibleConf.old+n);
}
function gi_getNewItemsPrev(i, o) {
return i.slice(0, o.items.visible);
}
function gi_getOldItemsNext(i, o) {
return i.slice(0, o.items.visibleConf.old);
}
function gi_getNewItemsNext(i, o, n) {
return i.slice(n, o.items.visible+n);
}
// sizes functions
function sz_resetMargin(i, o, m) {
var x = (typeof m == 'boolean') ? m : false;
if (typeof m != 'number') m = 0;
i.each(function() {
var j = $(this);
var t = parseInt(j.css(o.d['marginRight']));
if (isNaN(t)) t = 0;
j.data('cfs_tempCssMargin', t);
j.css(o.d['marginRight'], ((x) ? j.data('cfs_tempCssMargin') : m + j.data('cfs_origCssMargin')));
});
}
function sz_setSizes($c, o, p) {
var $w = $c.parent(),
$i = $c.children(),
$v = gi_getCurrentItems($i, o),
sz = cf_mapWrapperSizes(ms_getSizes($v, o, true), o, p);
$w.css(sz);
if (o.usePadding) {
var p = o.padding,
r = p[o.d[1]];
if (o.align) {
if (r < 0) r = 0;
}
var $l = $v.last();
$l.css(o.d['marginRight'], $l.data('cfs_origCssMargin') + r);
$c.css(o.d['top'], p[o.d[0]]);
$c.css(o.d['left'], p[o.d[3]]);
}
$c.css(o.d['width'], sz[o.d['width']]+(ms_getTotalSize($i, o, 'width')*2));
$c.css(o.d['height'], ms_getLargestSize($i, o, 'height'));
return sz;
}
// measuring functions
function ms_getSizes(i, o, wrapper) {
var s1 = ms_getTotalSize(i, o, 'width', wrapper),
s2 = ms_getLargestSize(i, o, 'height', wrapper);
return [s1, s2];
}
function ms_getLargestSize(i, o, dim, wrapper) {
if (typeof wrapper != 'boolean') wrapper = false;
if (typeof o[o.d[dim]] == 'number' && wrapper) return o[o.d[dim]];
if (typeof o.items[o.d[dim]] == 'number') return o.items[o.d[dim]];
var di2 = (dim.toLowerCase().indexOf('width') > -1) ? 'outerWidth' : 'outerHeight';
return ms_getTrueLargestSize(i, o, di2);
}
function ms_getTrueLargestSize(i, o, dim) {
var s = 0;
for (var a = 0, l = i.length; a < l; a++) {
var j = i.eq(a);
var m = (j.is(':visible')) ? j[o.d[dim]](true) : 0;
if (s < m) s = m;
}
return s;
}
function ms_getTrueInnerSize($el, o, dim) {
if (!$el.is(':visible')) return 0;
var siz = $el[o.d[dim]](),
arr = (o.d[dim].toLowerCase().indexOf('width') > -1) ? ['paddingLeft', 'paddingRight'] : ['paddingTop', 'paddingBottom'];
for (var a = 0, l = arr.length; a < l; a++) {
var m = parseInt($el.css(arr[a]));
siz -= (isNaN(m)) ? 0 : m;
}
return siz;
}
function ms_getTotalSize(i, o, dim, wrapper) {
if (typeof wrapper != 'boolean') wrapper = false;
if (typeof o[o.d[dim]] == 'number' && wrapper) return o[o.d[dim]];
if (typeof o.items[o.d[dim]] == 'number') return o.items[o.d[dim]] * i.length;
var d = (dim.toLowerCase().indexOf('width') > -1) ? 'outerWidth' : 'outerHeight',
s = 0;
for (var a = 0, l = i.length; a < l; a++) {
var j = i.eq(a);
s += (j.is(':visible')) ? j[o.d[d]](true) : 0;
}
return s;
}
function ms_hasVariableSizes(i, o, dim) {
var s = false,
v = false;
for (var a = 0, l = i.length; a < l; a++) {
var j = i.eq(a);
var c = (j.is(':visible')) ? j[o.d[dim]](true) : 0;
if (s === false) s = c;
else if (s != c) v = true;
if (s == 0) v = true;
}
return v;
}
function ms_getPaddingBorderMargin(i, o, d) {
return i[o.d['outer'+d]](true) - ms_getTrueInnerSize(i, o, 'inner'+d);
}
function ms_isPercentage(x) {
return (typeof x == 'string' && x.substr(-1) == '%');
}
function ms_getPercentage(s, o) {
if (ms_isPercentage(o)) {
o = o.substring(0, o.length-1);
if (isNaN(o)) return s;
s *= o/100;
}
return s;
}
// config functions
function cf_e(n, c, pf, ns, rd) {
if (typeof pf != 'boolean') pf = true;
if (typeof ns != 'boolean') ns = true;
if (typeof rd != 'boolean') rd = false;
if (pf) n = c.events.prefix + n;
if (ns) n = n +'.'+ c.events.namespace;
if (ns && rd) n += c.serialNumber;
return n;
}
function cf_c(n, c) {
return (typeof c.classnames[n] == 'string') ? c.classnames[n] : n;
}
function cf_mapWrapperSizes(ws, o, p) {
if (typeof p != 'boolean') p = true;
var pad = (o.usePadding && p) ? o.padding : [0, 0, 0, 0];
var wra = {};
wra[o.d['width']] = ws[0] + pad[1] + pad[3];
wra[o.d['height']] = ws[1] + pad[0] + pad[2];
return wra;
}
function cf_sortParams(vals, typs) {
var arr = [];
for (var a = 0, l1 = vals.length; a < l1; a++) {
for (var b = 0, l2 = typs.length; b < l2; b++) {
if (typs[b].indexOf(typeof vals[a]) > -1 && typeof arr[b] == 'undefined') {
arr[b] = vals[a];
break;
}
}
}
return arr;
}
function cf_getPadding(p) {
if (typeof p == 'undefined') return [0, 0, 0, 0];
if (typeof p == 'number') return [p, p, p, p];
else if (typeof p == 'string') p = p.split('px').join('').split('em').join('').split(' ');
if (!is_array(p)) {
return [0, 0, 0, 0];
}
for (var i = 0; i < 4; i++) {
p[i] = parseInt(p[i]);
}
switch (p.length) {
case 0: return [0, 0, 0, 0];
case 1: return [p[0], p[0], p[0], p[0]];
case 2: return [p[0], p[1], p[0], p[1]];
case 3: return [p[0], p[1], p[2], p[1]];
default: return [p[0], p[1], p[2], p[3]];
}
}
function cf_getAlignPadding(itm, o) {
var x = (typeof o[o.d['width']] == 'number') ? Math.ceil(o[o.d['width']] - ms_getTotalSize(itm, o, 'width')) : 0;
switch (o.align) {
case 'left': return [0, x];
case 'right': return [x, 0];
case 'center':
default:
return [Math.ceil(x/2), Math.floor(x/2)];
}
}
function cf_getAdjust(x, o, a, $t) {
var v = x;
if (typeof a == 'function') {
v = a.call($t, v);
} else if (typeof a == 'string') {
var p = a.split('+'),
m = a.split('-');
if (m.length > p.length) {
var neg = true,
sta = m[0],
adj = m[1];
} else {
var neg = false,
sta = p[0],
adj = p[1];
}
switch(sta) {
case 'even':
v = (x % 2 == 1) ? x-1 : x;
break;
case 'odd':
v = (x % 2 == 0) ? x-1 : x;
break;
default:
v = x;
break;
}
adj = parseInt(adj);
if (!isNaN(adj)) {
if (neg) adj = -adj;
v += adj;
}
}
if (typeof v != 'number') v = 1;
if (v < 1) v = 1;
return v;
}
function cf_getItemsAdjust(x, o, a, $t) {
return cf_getItemAdjustMinMax(cf_getAdjust(x, o, a, $t), o.items.visibleConf);
}
function cf_getItemAdjustMinMax(v, i) {
if (typeof i.min == 'number' && v < i.min) v = i.min;
if (typeof i.max == 'number' && v > i.max) v = i.max;
if (v < 1) v = 1;
return v;
}
function cf_getSynchArr(s) {
if (!is_array(s)) s = [[s]];
if (!is_array(s[0])) s = [s];
for (var j = 0, l = s.length; j < l; j++) {
if (typeof s[j][0] == 'string') s[j][0] = $(s[j][0]);
if (typeof s[j][1] != 'boolean') s[j][1] = true;
if (typeof s[j][2] != 'boolean') s[j][2] = true;
if (typeof s[j][3] != 'number') s[j][3] = 0;
}
return s;
}
function cf_getKeyCode(k) {
if (k == 'right') return 39;
if (k == 'left') return 37;
if (k == 'up') return 38;
if (k == 'down') return 40;
return -1;
}
function cf_setCookie(n, v) {
if (n) document.cookie = n+'='+v+'; path=/';
}
function cf_readCookie(n) {
n += '=';
var ca = document.cookie.split(';');
for (var a = 0, l = ca.length; a < l; a++) {
var c = ca[a];
while (c.charAt(0) == ' ') {
c = c.substring(1, c.length);
}
if (c.indexOf(n) == 0) {
return c.substring(n.length, c.length);
}
}
return 0;
}
// buttons functions
function bt_pauseOnHoverConfig(p) {
if (p && typeof p == 'string') {
var i = (p.indexOf('immediate') > -1) ? true : false,
r = (p.indexOf('resume') > -1) ? true : false;
} else {
var i = r = false;
}
return [i, r];
}
function bt_mousesheelNumber(mw) {
return (typeof mw == 'number') ? mw : null
}
// helper functions
function is_array(a) {
return typeof(a) == 'object' && (a instanceof Array);
}
function getTime() {
return new Date().getTime();
}
function debug(d, m) {
if (typeof d == 'object') {
var s = ' ('+d.selector+')';
d = d.debug;
} else {
var s = '';
}
if (!d) return false;
if (typeof m == 'string') m = 'carouFredSel'+s+': ' + m;
else m = ['carouFredSel'+s+':', m];
if (window.console && window.console.log) window.console.log(m);
return false;
}
// CAROUFREDSEL ALL LOWERCASE
$.fn.caroufredsel = function(o, c) {
return this.carouFredSel(o, c);
};
// EASING FUNCTIONS
$.extend($.easing, {
'quadratic' : function(t) {
var t2 = t * t;
return t * (-t2 * t + 4 * t2 - 6 * t + 4);
},
'cubic' : function(t) {
return t * (4 * t * t - 9 * t + 6);
},
'elastic' : function(t) {
var t2 = t * t;
return t * (33 * t2 * t2 - 106 * t2 * t + 126 * t2 - 67 * t + 15);
}
});
})(jQuery);
//]]>
</script>
<script type='text/javascript'>
//<![CDATA[
function showrecentcomments(json){for(var i=0;i<a_rc;i++){var b_rc=json.feed.entry[i];var c_rc;if(i==json.feed.entry.length)break;for(var k=0;k<b_rc.link.length;k++){if(b_rc.link[k].rel=='alternate'){c_rc=b_rc.link[k].href;break;}}c_rc=c_rc.replace("#","#comment-");var d_rc=c_rc.split("#");d_rc=d_rc[0];var e_rc=d_rc.split("/");e_rc=e_rc[5];e_rc=e_rc.split(".html");e_rc=e_rc[0];var f_rc=e_rc.replace(/-/g," ");f_rc=f_rc.link(d_rc);var g_rc=b_rc.published.$t;var h_rc=g_rc.substring(0,4);var i_rc=g_rc.substring(5,7);var j_rc=g_rc.substring(8,10);var k_rc=new Array();k_rc[1]="Jan";k_rc[2]="Feb";k_rc[3]="Mar";k_rc[4]="Apr";k_rc[5]="May";k_rc[6]="Jun";k_rc[7]="Jul";k_rc[8]="Aug";k_rc[9]="Sep";k_rc[10]="Oct";k_rc[11]="Nov";k_rc[12]="Dec";if("content" in b_rc){var l_rc=b_rc.content.$t;}else if("summary" in b_rc){var l_rc=b_rc.summary.$t;}else var l_rc="";var re=/<\S[^>]*>/g;l_rc=l_rc.replace(re,"");if(m_rc==true)document.write('On '+k_rc[parseInt(i_rc,10)]+' '+j_rc+' ');document.write('<a href="'+c_rc+'">'+b_rc.author[0].name.$t+'</a> commented');if(n_rc==true)document.write(' on '+f_rc);document.write(': ');if(l_rc.length<o_rc){document.write('<i>“');document.write(l_rc);document.write('”</i><br/><br/>');}else{document.write('<i>“');l_rc=l_rc.substring(0,o_rc);var p_rc=l_rc.lastIndexOf(" ");l_rc=l_rc.substring(0,p_rc);document.write(l_rc+'…”</i>');document.write('<br/><br/>');}}}
function rp(json){document.write('<ul>');for(var i=0;i<numposts;i++){document.write('<li>');var entry=json.feed.entry[i];var posttitle=entry.title.$t;var posturl;if(i==json.feed.entry.length)break;for(var k=0;k<entry.link.length;k++){if(entry.link[k].rel=='alternate'){posturl=entry.link[k].href;break}}posttitle=posttitle.link(posturl);var readmorelink="(more)";readmorelink=readmorelink.link(posturl);var postdate=entry.published.$t;var cdyear=postdate.substring(0,4);var cdmonth=postdate.substring(5,7);var cdday=postdate.substring(8,10);var monthnames=new Array();monthnames[1]="Jan";monthnames[2]="Feb";monthnames[3]="Mar";monthnames[4]="Apr";monthnames[5]="May";monthnames[6]="Jun";monthnames[7]="Jul";monthnames[8]="Aug";monthnames[9]="Sep";monthnames[10]="Oct";monthnames[11]="Nov";monthnames[12]="Dec";if("content"in entry){var postcontent=entry.content.$t}else if("summary"in entry){var postcontent=entry.summary.$t}else var postcontent="";var re=/<\S[^>]*>/g;postcontent=postcontent.replace(re,"");document.write(posttitle);if(showpostdate==true)document.write(' - '+monthnames[parseInt(cdmonth,10)]+' '+cdday);if(showpostsummary==true){if(postcontent.length<numchars){document.write(postcontent)}else{postcontent=postcontent.substring(0,numchars);var quoteEnd=postcontent.lastIndexOf(" ");postcontent=postcontent.substring(0,quoteEnd);document.write(postcontent+'...'+readmorelink)}}document.write('</li>')}document.write('</ul>')}
//]]>
</script>
<script type='text/javascript'>
summary_noimg = 550;
summary_img = 450;
img_thumb_height = 200;
img_thumb_width = 200;
</script>
<script type='text/javascript'>
//<![CDATA[
function removeHtmlTag(strx,chop){
if(strx.indexOf("<")!=-1)
{
var s = strx.split("<");
for(var i=0;i<s.length;i++){
if(s[i].indexOf(">")!=-1){
s[i] = s[i].substring(s[i].indexOf(">")+1,s[i].length);
}
}
strx = s.join("");
}
chop = (chop < strx.length-1) ? chop : strx.length-2;
while(strx.charAt(chop-1)!=' ' && strx.indexOf(' ',chop)!=-1) chop++;
strx = strx.substring(0,chop-1);
return strx+'...';
}
function createSummaryAndThumb(pID){
var div = document.getElementById(pID);
var imgtag = "";
var img = div.getElementsByTagName("img");
var summ = summary_noimg;
if(img.length>=1) {
imgtag = '<span style="float:left; padding:0px 10px 5px 0px;"><img src="'+img[0].src+'" width="'+img_thumb_width+'px" height="'+img_thumb_height+'px"/></span>';
summ = summary_img;
}
var summary = imgtag + '<div>' + removeHtmlTag(div.innerHTML,summ) + '</div>';
div.innerHTML = summary;
}
//]]>
</script>
</head>
<body>
<div id='wrapper'><!-- wrapper begin -->
<div id='masthead'><!-- masthead begin -->
<div class='clearfix' id='top'>
<div class='blogname'>
<b:section class='header' id='header' maxwidgets='1' showaddelement='no'>
<b:widget id='Header1' locked='true' title=' Valor (Header)' type='Header'>
<b:includable id='title'>
<a expr:href='data:blog.homepageUrl'><data:title/></a>
</b:includable>
<b:includable id='description'>
<div class='descriptionwrapper'>
<h2><data:description/></h2>
</div>
</b:includable>
<b:includable id='main'>
<b:if cond='data:useImage'>
<b:if cond='data:imagePlacement == "REPLACE"'>
<!--Show just the image, no text-->
<div id='header-inner'>
<a expr:href='data:blog.homepageUrl' style='display: block'>
<img expr:alt='data:title' expr:height='data:height' expr:id='data:widget.instanceId + "_headerimg"' expr:src='data:sourceUrl' expr:width='data:width' style='display: block;padding-left:0px;padding-top:0px;'/>
</a>
</div>
<b:else/>
<!--
Show image as background to text. You can't really calculate the width
reliably in JS because margins are not taken into account by any of
clientWidth, offsetWidth or scrollWidth, so we don't force a minimum
width if the user is using shrink to fit.
This results in a margin-width's worth of pixels being cropped. If the
user is not using shrink to fit then we expand the header.
-->
<div expr:style='"background-image: url(\"" + data:sourceUrl + "\"); " + "background-position: " + data:backgroundPositionStyleStr + "; " + data:widthStyleStr + "min-height: " + data:height + "px;" + "_height: " + data:height + "px;" + "background-repeat: no-repeat; "' id='header-inner'>
<div class='titlewrapper' style='background: transparent'>
<h1 class='logo' style='background: transparent; border-width: 0px'>
<b:include name='title'/>
</h1>
</div>
<b:include name='description'/>
</div>
</b:if>
<b:else/>
<!--No header image -->
<div id='header-inner'>
<div class='titlewrapper'>
<h1 class='logo'>
<b:include name='title'/>
</h1>
</div>
<b:include name='description'/>
</div>
</b:if>
</b:includable>
</b:widget>
</b:section>
</div>
<div id='search'>
<form expr:action='data:blog.homepageUrl + "search/"' id='searchform' method='get'>
<div>
<input id='s' name='q' type='text' value=''/>
<input id='searchsubmit' type='submit' value='Search'/>
</div>
</form>
</div>
<div class='clear'/>
</div>
<div id='botmenu'>
<div class='menu-valormenu-container' id='subnav'>
<b:section class='nbttopmenu' id='nbttopmenu' showaddelement='no'>
<b:widget id='PageList8' locked='false' title='Pages - Menu' type='PageList'>
<b:includable id='main'>
<b:if cond='data:title'><!--<h2><data:title/></h2>--></b:if>
<div class='widget-content'>
<ul class='sfmenu' id='menu-valormenu'>
<b:loop values='data:links' var='link'>
<b:if cond='data:link.isCurrentPage'>
<li id='currentpage'><a expr:href='data:link.href'><data:link.title/></a></li>
<b:else/>
<li><a expr:href='data:link.href'><data:link.title/></a></li>
</b:if>
</b:loop>
</ul>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>
<b:widget id='LinkList1' locked='true' title='Edit This Menu' type='LinkList'>
<b:includable id='main'>
<div class='widget-content'>
<ul class='sfmenu' id='menu-valormenu'>
<b:loop values='data:links' var='link'>
<li><a expr:href='data:link.target'><data:link.name/></a></li>
</b:loop>
</ul>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>
</b:section>
</div>
</div>
</div><!--end masthead-->
<div id='casing'>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<div id='nbtfeature'>
<div class='flexslider'>
<ul class='slides'>
<li>
<a href='ENTER-SLIDE-1-URL-HERE'><img class='f-image' height='500' src='http://2.bp.blogspot.com/-prQK0px0pfI/UQhGhpxGmuI/AAAAAAAABBw/a-6KBm0EdDc/s000/slide1-1000x500.jpg' width='1000'/></a>
<div class='flex-caption'>
<h3> Introducing: Agent 47 – Hitman</h3>
<p><p>Nulla condimentum pulvinar turpis, ac dapibus purus consequat a. Maecenas condimentum lorem id tellus scelerisque sagittis. Aenean odio massa, tristique quis posuere non, porta a [...]</p></p>
</div>
</li>
<li>
<a href='ENTER-SLIDE-2-URL-HERE'><img class='f-image' height='500' src='http://1.bp.blogspot.com/-tFhBtYds6Cw/UQhGiZJCNnI/AAAAAAAABB4/G45AyT4N7jU/s000/slide2-1000x500.jpg' width='1000'/></a>
<div class='flex-caption'>
<h3> Starcraft II: Heart of the Swarm hands-on at MLG event</h3>
<p><p>In suscipit vestibulum sem, nec consectetur enim consequat nec. Donec elit turpis; dignissim pharetra porttitor in, fringilla sed tortor. Vivamus scelerisque blandit velit sit amet [...]</p></p>
</div>
</li>
<li>
<a href='ENTER-SLIDE-3-URL-HERE'><img class='f-image' height='500' src='http://1.bp.blogspot.com/-4duFeaWBOfI/UQhGi3AQxzI/AAAAAAAABCA/DtriFzbAKXs/s000/slide3-1000x500.jpg' width='1000'/></a>
<div class='flex-caption'>
<h3> Crysis dev backtracks on blocking used games comment</h3>
<p><p>Suspendisse tellus nunc, iaculis vulputate placerat sit amet, lacinia sed mi. Nulla quam nisl, eleifend nec iaculis eu, sollicitudin sed lectus. Vivamus sodales tempor massa [...]</p></p>
</div>
</li>
<li>
<a href='ENTER-SLIDE-4-URL-HERE'><img class='f-image' height='500' src='http://2.bp.blogspot.com/-pbm0QGbCYzY/UQhGjgkeqVI/AAAAAAAABCI/U2PNiMPS6rs/s000/slide4-1000x500.jpg' width='1000'/></a>
<div class='flex-caption'>
<h3> Diablo III auction house fees, Global Play revealed</h3>
<p><p>Aenean tristique varius egestas. Nulla urna enim, facilisis nec pretium in, euismod at dui! Donec ac neque eu eros facilisis malesuada. Class aptent taciti sociosqu [...]</p></p>
</div>
</li>
</ul>
</div>
</div>
</b:if>
<!-- end feature -->
<b:if cond='data:blog.url == data:blog.homepageUrl'>
<div id='videoslide'>
<div class='caroselhead'>
<h2>Game Videos</h2>
<a class='prev' href='#' id='prev2'/>
<a class='next' href='#' id='next2'/>
</div>
<div class='timer' id='timer1'/>
<ul id='carousel'>
<li class='panel'>
<a href='ENTER-PANEL-1-URL-HERE'><img class='v-image' height='200' src='http://3.bp.blogspot.com/-ugE7knnTvP0/UQhGkKpw-8I/AAAAAAAABCQ/76gJp0LdLjA/s000/panel1-150x200.jpg' width='150'/></a>
<h3><a href='ENTER-PANEL-1-URL-HERE'>Arkham city</a></h3>
</li>
<li class='panel'>
<a href='ENTER-PANEL-2-URL-HERE'><img class='v-image' height='200' src='http://1.bp.blogspot.com/-8_4_jlG7Ams/UQhGkw82BPI/AAAAAAAABCY/nncntsowfzY/s000/panel2-150x200.jpg' width='150'/></a>
<h3><a href='ENTER-PANEL-2-URL-HERE'>Bioshock</a></h3>
</li>
<li class='panel'>
<a href='ENTER-PANEL-3-URL-HERE'><img class='v-image' height='200' src='http://1.bp.blogspot.com/-4JiZPf3-BwQ/UQhGlZzearI/AAAAAAAABCg/y05k2An_KPA/s000/panel3-150x200.jpg' width='150'/></a>
<h3><a href='ENTER-PANEL-3-URL-HERE'>Crysis</a></h3>
</li>
<li class='panel'>
<a href='ENTER-PANEL-4-URL-HERE'><img class='v-image' height='200' src='http://4.bp.blogspot.com/-4OmawhHNknc/UQhGmKQMKUI/AAAAAAAABCo/3QC-cIHAz94/s000/panel4-150x200.jpg' width='150'/></a>
<h3><a href='ENTER-PANEL-4-URL-HERE'>Resistance</a></h3>
</li>
<li class='panel'>
<a href='ENTER-PANEL-5-URL-HERE'><img class='v-image' height='200' src='http://1.bp.blogspot.com/-WHqPhHb4ZdY/UQhGmvb2U0I/AAAAAAAABCw/0WvTiKYdFGw/s000/panel5-150x200.jpg' width='150'/></a>
<h3><a href='ENTER-PANEL-5-URL-HERE'>Fallout 3</a></h3>
</li>
<li class='panel'>
<a href='ENTER-PANEL-6-URL-HERE'><img class='v-image' height='200' src='http://1.bp.blogspot.com/-uucTIS6O_yQ/UQhGnCvNm1I/AAAAAAAABC4/FDeTQEF91Mg/s000/panel6-150x200.jpg' width='150'/></a>
<h3><a href='ENTER-PANEL-6-URL-HERE'>Killzone 2</a></h3>
</li>
<li class='panel'>
<a href='ENTER-PANEL-7-URL-HERE'><img class='v-image' height='200' src='http://2.bp.blogspot.com/-5j9a8SuTD1I/UQhGok27q5I/AAAAAAAABDA/euJIK2MK8DY/s000/panel7-150x200.jpg' width='150'/></a>
<h3><a href='ENTER-PANEL-7-URL-HERE'>Oblivion</a></h3>
</li>
<li class='panel'>
<a href='ENTER-PANEL-8-URL-HERE'><img class='v-image' height='200' src='http://4.bp.blogspot.com/-p-9obshQz_c/UQhGpQHWDYI/AAAAAAAABDI/sup1Xt0C7M0/s000/panel8-150x200.jpg' width='150'/></a>
<h3><a href='ENTER-PANEL-8-URL-HERE'>Alone in Dark</a></h3>
</li>
</ul>
</div>
</b:if>
<!-- end videoslide -->
<div id='left'>
<b:section class='mainblog' id='mainblog' showaddelement='no'>
<b:widget id='Blog1' locked='true' title='Blog Posts' type='Blog'>
<b:includable id='nextprev'>
<div class='blog-pager' id='blog-pager'>
<b:if cond='data:newerPageUrl'>
<span id='blog-pager-newer-link'>
<a class='blog-pager-newer-link' expr:href='data:newerPageUrl' expr:id='data:widget.instanceId + "_blog-pager-newer-link"' expr:title='data:newerPageTitle'><data:newerPageTitle/></a>
</span>
</b:if>
<b:if cond='data:olderPageUrl'>
<span id='blog-pager-older-link'>
<a class='blog-pager-older-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + "_blog-pager-older-link"' expr:title='data:olderPageTitle'><data:olderPageTitle/></a>
</span>
</b:if>
<a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a>
<b:if cond='data:mobileLinkUrl'>
<div class='blog-mobile-link'>
<a expr:href='data:mobileLinkUrl'><data:mobileLinkMsg/></a>
</div>
</b:if>
</div>
<div class='clear'/>
</b:includable>
<b:includable id='shareButtons' var='post'>
<b:if cond='data:top.showEmailButton'><a class='goog-inline-block share-button sb-email' expr:href='data:post.sharePostUrl + "&target=email"' expr:title='data:top.emailThisMsg' target='_blank'><span class='share-button-link-text'><data:top.emailThisMsg/></span></a></b:if><b:if cond='data:top.showBlogThisButton'><a class='goog-inline-block share-button sb-blog' expr:href='data:post.sharePostUrl + "&target=blog"' expr:onclick='"window.open(this.href, \"_blank\", \"height=270,width=475\"); return false;"' expr:title='data:top.blogThisMsg' target='_blank'><span class='share-button-link-text'><data:top.blogThisMsg/></span></a></b:if><b:if cond='data:top.showTwitterButton'><a class='goog-inline-block share-button sb-twitter' expr:href='data:post.sharePostUrl + "&target=twitter"' expr:title='data:top.shareToTwitterMsg' target='_blank'><span class='share-button-link-text'><data:top.shareToTwitterMsg/></span></a></b:if><b:if cond='data:top.showFacebookButton'><a class='goog-inline-block share-button sb-facebook' expr:href='data:post.sharePostUrl + "&target=facebook"' expr:onclick='"window.open(this.href, \"_blank\", \"height=430,width=640\"); return false;"' expr:title='data:top.shareToFacebookMsg' target='_blank'><span class='share-button-link-text'><data:top.shareToFacebookMsg/></span></a></b:if><b:if cond='data:top.showOrkutButton'><a class='goog-inline-block share-button sb-orkut' expr:href='data:post.sharePostUrl + "&target=orkut"' expr:title='data:top.shareToOrkutMsg' target='_blank'><span class='share-button-link-text'><data:top.shareToOrkutMsg/></span></a></b:if><b:if cond='data:top.showDummy'><div class='goog-inline-block dummy-container'><data:post.dummyTag/></div></b:if>
</b:includable>
<b:includable id='backlinks' var='post'>
<a name='links'/><h4><data:post.backlinksLabel/></h4>
<b:if cond='data:post.numBacklinks != 0'>
<dl class='comments-block' id='comments-block'>
<b:loop values='data:post.backlinks' var='backlink'>
<div class='collapsed-backlink backlink-control'>
<dt class='comment-title'>
<span class='backlink-toggle-zippy'> </span>
<a expr:href='data:backlink.url' rel='nofollow'><data:backlink.title/></a>
<b:include data='backlink' name='backlinkDeleteIcon'/>
</dt>
<dd class='comment-body collapseable'>
<data:backlink.snippet/>
</dd>
<dd class='comment-footer collapseable'>
<span class='comment-author'><data:post.authorLabel/> <data:backlink.author/></span>
<span class='comment-timestamp'><data:post.timestampLabel/> <data:backlink.timestamp/></span>
</dd>
</div>
</b:loop>
</dl>
</b:if>
<p class='comment-footer'>
<a class='comment-link' expr:href='data:post.createLinkUrl' expr:id='data:widget.instanceId + "_backlinks-create-link"' target='_blank'><data:post.createLinkLabel/></a>
</p>
</b:includable>
<b:includable id='comment_count_picker' var='post'>
<b:if cond='data:post.forceIframeComments'>
<span class='cmt_count_iframe_holder' expr:data-count='data:post.numComments' expr:data-onclick='data:post.addCommentOnclick' expr:data-url='data:post.canonicalUrl'>
</span>
<b:else/>
<b:if cond='data:post.commentSource == 1'>
<span class='cmt_count_iframe_holder' expr:data-count='data:post.numComments' expr:data-onclick='data:post.addCommentOnclick' expr:data-url='data:post.canonicalUrl'>
</span>
<b:else/>
<a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'>
<data:post.commentLabelFull/>:
</a>
</b:if>
</b:if>
</b:includable>
<b:includable id='threaded_comment_js' var='post'>
<script async='async' expr:src='data:post.commentSrc' type='text/javascript'/>
<script type='text/javascript'>
(function() {
var items = <data:post.commentJso/>;
var msgs = <data:post.commentMsgs/>;
var config = <data:post.commentConfig/>;
// <![CDATA[
var cursor = null;
if (items && items.length > 0) {
cursor = parseInt(items[items.length - 1].timestamp) + 1;
}
var bodyFromEntry = function(entry) {
if (entry.gd$extendedProperty) {
for (var k in entry.gd$extendedProperty) {
if (entry.gd$extendedProperty[k].name == 'blogger.contentRemoved') {
return '<span class="deleted-comment">' + entry.content.$t + '</span>';
}
}
}
return entry.content.$t;
}
var parse = function(data) {
cursor = null;
var comments = [];
if (data && data.feed && data.feed.entry) {
for (var i = 0, entry; entry = data.feed.entry[i]; i++) {
var comment = {};
// comment ID, parsed out of the original id format
var id = /blog-(\d+).post-(\d+)/.exec(entry.id.$t);
comment.id = id ? id[2] : null;
comment.body = bodyFromEntry(entry);
comment.timestamp = Date.parse(entry.published.$t) + '';
if (entry.author && entry.author.constructor === Array) {
var auth = entry.author[0];
if (auth) {
comment.author = {
name: (auth.name ? auth.name.$t : undefined),
profileUrl: (auth.uri ? auth.uri.$t : undefined),
avatarUrl: (auth.gd$image ? auth.gd$image.src : undefined)
};
}
}
if (entry.link) {
if (entry.link[2]) {
comment.link = comment.permalink = entry.link[2].href;
}
if (entry.link[3]) {
var pid = /.*comments\/default\/(\d+)\?.*/.exec(entry.link[3].href);
if (pid && pid[1]) {
comment.parentId = pid[1];
}
}
}
comment.deleteclass = 'item-control blog-admin';
if (entry.gd$extendedProperty) {
for (var k in entry.gd$extendedProperty) {
if (entry.gd$extendedProperty[k].name == 'blogger.itemClass') {
comment.deleteclass += ' ' + entry.gd$extendedProperty[k].value;
}
}
}
comments.push(comment);
}
}
return comments;
};
var paginator = function(callback) {
if (hasMore()) {
var url = config.feed + '?alt=json&v=2&orderby=published&reverse=false&max-results=50';
if (cursor) {
url += '&published-min=' + new Date(cursor).toISOString();
}
window.bloggercomments = function(data) {
var parsed = parse(data);
cursor = parsed.length < 50 ? null
: parseInt(parsed[parsed.length - 1].timestamp) + 1
callback(parsed);
window.bloggercomments = null;
}
url += '&callback=bloggercomments';
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = url;
document.getElementsByTagName('head')[0].appendChild(script);
}
};
var hasMore = function() {
return !!cursor;
};
var getMeta = function(key, comment) {
if ('iswriter' == key) {
var matches = !!comment.author
&& comment.author.name == config.authorName
&& comment.author.profileUrl == config.authorUrl;
return matches ? 'true' : '';
} else if ('deletelink' == key) {
return config.baseUri + '/delete-comment.g?blogID='
+ config.blogId + '&postID=' + comment.id;
} else if ('deleteclass' == key) {
return comment.deleteclass;
}
return '';
};
var replybox = null;
var replyUrlParts = null;
var replyParent = undefined;
var onReply = function(commentId, domId) {
if (replybox == null) {
// lazily cache replybox, and adjust to suit this style:
replybox = document.getElementById('comment-editor');
if (replybox != null) {
replybox.height = '250px';
replybox.style.display = 'block';
replyUrlParts = replybox.src.split('#');
}
}
if (replybox && (commentId !== replyParent)) {
document.getElementById(domId).insertBefore(replybox, null);
replybox.src = replyUrlParts[0]
+ (commentId ? '&parentID=' + commentId : '')
+ '#' + replyUrlParts[1];
replyParent = commentId;
}
};
var hash = (window.location.hash || '#').substring(1);
var startThread, targetComment;
if (/^comment-form_/.test(hash)) {
startThread = hash.substring('comment-form_'.length);
} else if (/^c[0-9]+$/.test(hash)) {
targetComment = hash.substring(1);
}
// Configure commenting API:
var configJso = {
'maxDepth': config.maxThreadDepth
};
var provider = {
'id': config.postId,
'data': items,
'loadNext': paginator,
'hasMore': hasMore,
'getMeta': getMeta,
'onReply': onReply,
'rendered': true,
'initComment': targetComment,
'initReplyThread': startThread,
'config': configJso,
'messages': msgs
};
var render = function() {
if (window.goog && window.goog.comments) {
var holder = document.getElementById('comment-holder');
window.goog.comments.render(holder, provider);
}
};
// render now, or queue to render when library loads:
if (window.goog && window.goog.comments) {
render();
} else {
window.goog = window.goog || {};
window.goog.comments = window.goog.comments || {};
window.goog.comments.loadQueue = window.goog.comments.loadQueue || [];
window.goog.comments.loadQueue.push(render);
}
})();
// ]]>
</script>
</b:includable>
<b:includable id='mobile-main' var='top'>
<!-- posts -->
<div class='blog-posts hfeed'>
<b:include data='top' name='status-message'/>
<b:if cond='data:blog.pageType == "index"'>
<b:loop values='data:posts' var='post'>
<b:include data='post' name='mobile-index-post'/>
</b:loop>
<b:else/>
<b:loop values='data:posts' var='post'>
<b:include data='post' name='mobile-post'/>
</b:loop>
</b:if>
</div>
<b:include name='mobile-nextprev'/>
</b:includable>
<b:includable id='post' var='post'>
<div class='post hentry'>
<a expr:name='data:post.id'/>
<div class='bposttitle'>
<h2 class='post-title entry-title'>
<b:if cond='data:post.link'>
<a expr:href='data:post.link'><data:post.title/></a>
<b:else/>
<b:if cond='data:post.url'>
<a expr:href='data:post.url'><data:post.title/></a>
<b:else/>
<data:post.title/>
</b:if>
</b:if>
</h2>
<b:if cond='data:blog.pageType != "static_page"'>
<div class='postmeta'><span>Posted by <data:post.author/></span> | <span><data:post.timestamp/></span> | <span><b:if cond='data:post.labels'><b:loop values='data:post.labels' var='label'><a expr:href='data:label.url' rel='tag'><data:label.name/></a><b:if cond='data:label.isLast != "true"'>, </b:if></b:loop></b:if></span></div>
</b:if>
</div>
<div class='post-header-line-1'/>
<div class='entry'>
<div class='post-body entry-content'>
<b:if cond='data:blog.pageType != "static_page"'>
<b:if cond='data:blog.pageType != "item"'>
<div expr:id='"summary" + data:post.id'><data:post.body/></div>
<script type='text/javascript'>createSummaryAndThumb("summary<data:post.id/>");</script>
</b:if>
</b:if>
<b:if cond='data:blog.pageType == "item"'><data:post.body/></b:if>
<b:if cond='data:blog.pageType == "static_page"'><data:post.body/></b:if>
<b:if cond='data:blog.pageType != "static_page"'>
<b:if cond='data:blog.pageType != "item"'>
<div class='readmore'>
<a class='rmore' expr:href='data:post.url'>Read More</a>
</div>
</b:if>
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<div class='postmeta'>
<span class='categori'>Categories: <b:if cond='data:post.labels'><b:loop values='data:post.labels' var='label'><a expr:href='data:label.url' rel='tag'><data:label.name/></a><b:if cond='data:label.isLast != "true"'>, </b:if></b:loop></b:if></span>
</div>
<div style='clear: both;'/>
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<div style='clear:both;'/>
<div class='post-share-buttons'>
<b:include data='post' name='shareButtons'/>
</div>
<span class='reaction-buttons'>
<b:if cond='data:top.showReactions'>
<table border='0' cellpadding='0' width='100%'><tr>
<td style='font-size:12px;padding-top:2px;' valign='top'><span class='reactions-label'><data:top.reactionsLabel/></span></td>
<td><iframe allowtransparency='true' class='reactions-iframe' expr:src='data:post.reactionsUrl' frameborder='0' name='reactions' scrolling='no'/></td>
</tr></table>
</b:if>
</span>
</b:if>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
</div>
</div>
<div style='clear: both;'/>
<b:if cond='data:blog.pageType == "item"'>
<!-- navigation -->
<b:include name='nextprev'/>
</b:if>
</b:includable>
<b:includable id='comment_picker' var='post'>
<b:if cond='data:post.commentSource == 1'>
<b:include data='post' name='iframe_comments'/>
<b:else/>
<b:if cond='data:post.showThreadedComments'>
<b:include data='post' name='threaded_comments'/>
<b:else/>
<b:include data='post' name='comments'/>
</b:if>
</b:if>
</b:includable>
<b:includable id='status-message'>
<b:if cond='data:navMessage'>
<div class='status-msg-wrap'>
<div class='status-msg-body'>
<data:navMessage/>
</div>
<div class='status-msg-border'>
<div class='status-msg-bg'>
<div class='status-msg-hidden'><data:navMessage/></div>
</div>
</div>
</div>
<div style='clear: both;'/>
</b:if>
</b:includable>
<b:includable id='comment-form' var='post'>
<div class='comment-form'>
<a name='comment-form'/>
<b:if cond='data:mobile'>
<h4 id='comment-post-message'>
<a expr:id='data:widget.instanceId + "_comment-editor-toggle-link"' href='javascript:void(0)'><data:postCommentMsg/></a></h4>
<p><data:blogCommentMessage/></p>
<data:blogTeamBlogMessage/>
<a expr:href='data:post.commentFormIframeSrc' id='comment-editor-src'/>
<iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410' id='comment-editor' name='comment-editor' src='' style='display: none' width='100%'/>
<b:else/>
<h4 id='comment-post-message'><data:postCommentMsg/></h4>
<p><data:blogCommentMessage/></p>
<data:blogTeamBlogMessage/>
<a expr:href='data:post.commentFormIframeSrc' id='comment-editor-src'/>
<iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410' id='comment-editor' name='comment-editor' src='' width='100%'/>
</b:if>
<data:post.friendConnectJs/>
<data:post.cmtfpIframe/>
<script type='text/javascript'>
BLOG_CMT_createIframe('<data:post.appRpcRelayPath/>', '<data:post.communityId/>');
</script>
</div>
</b:includable>
<b:includable id='threaded_comments' var='post'>
<div class='comments' id='comments'>
<a name='comments'/>
<h4><data:post.commentLabelFull/>:</h4>
<div class='comments-content'>
<b:if cond='data:post.embedCommentForm'>
<b:include data='post' name='threaded_comment_js'/>
</b:if>
<div id='comment-holder'>
<data:post.commentHtml/>
</div>
</div>
<p class='comment-footer'>
<b:if cond='data:post.allowNewComments'>
<b:include data='post' name='threaded-comment-form'/>
<b:else/>
<data:post.noNewCommentsText/>
</b:if>
</p>
<b:if cond='data:showCmtPopup'>
<div id='comment-popup'>
<iframe allowtransparency='true' frameborder='0' id='comment-actions' name='comment-actions' scrolling='no'>
</iframe>
</div>
</b:if>
<div id='backlinks-container'>
<div expr:id='data:widget.instanceId + "_backlinks-container"'>
<b:if cond='data:post.showBacklinks'>
<b:include data='post' name='backlinks'/>
</b:if>
</div>
</div>
</div>
</b:includable>
<b:includable id='backlinkDeleteIcon' var='backlink'>
<span expr:class='"item-control " + data:backlink.adminClass'>
<a expr:href='data:backlink.deleteUrl' expr:title='data:top.deleteBacklinkMsg'>
<img src='//www.blogger.com/img/icon_delete13.gif'/>
</a>
</span>
</b:includable>
<b:includable id='mobile-nextprev'>
<div class='blog-pager' id='blog-pager'>
<b:if cond='data:newerPageUrl'>
<div class='mobile-link-button' id='blog-pager-newer-link'>
<a class='blog-pager-newer-link' expr:href='data:newerPageUrl' expr:id='data:widget.instanceId + "_blog-pager-newer-link"' expr:title='data:newerPageTitle'>‹</a>
</div>
</b:if>
<b:if cond='data:olderPageUrl'>
<div class='mobile-link-button' id='blog-pager-older-link'>
<a class='blog-pager-older-link' expr:href='data:olderPageUrl' expr:id='data:widget.instanceId + "_blog-pager-older-link"' expr:title='data:olderPageTitle'>›</a>
</div>
</b:if>
<div class='mobile-link-button' id='blog-pager-home-link'>
<a class='home-link' expr:href='data:blog.homepageUrl'><data:homeMsg/></a>
</div>
<div class='mobile-desktop-link'>
<a class='home-link' expr:href='data:desktopLinkUrl'><data:desktopLinkMsg/></a>
</div>
</div>
<div class='clear'/>
</b:includable>
<b:includable id='mobile-post' var='post'>
<div class='date-outer'>
<b:if cond='data:post.dateHeader'>
<h2 class='date-header'><span><data:post.dateHeader/></span></h2>
</b:if>
<div class='date-posts'>
<div class='post-outer'>
<div class='post hentry uncustomized-post-template'>
<a expr:name='data:post.id'/>
<b:if cond='data:post.title'>
<h3 class='post-title entry-title'>
<b:if cond='data:post.link'>
<a expr:href='data:post.link'><data:post.title/></a>
<b:else/>
<b:if cond='data:post.url'>
<b:if cond='data:blog.url != data:post.url'>
<a expr:href='data:post.url'><data:post.title/></a>
<b:else/>
<data:post.title/>
</b:if>
<b:else/>
<data:post.title/>
</b:if>
</b:if>
</h3>
</b:if>
<div class='post-header'>
<div class='post-header-line-1'/>
</div>
<div class='post-body entry-content' expr:id='"post-body-" + data:post.id'>
<data:post.body/>
<div style='clear: both;'/> <!-- clear for photos floats -->
</div>
<div class='post-footer'>
<div class='post-footer-line post-footer-line-1'>
<span class='post-author vcard'>
<b:if cond='data:top.showAuthor'>
<b:if cond='data:post.authorProfileUrl'>
<span class='fn'>
<a expr:href='data:post.authorProfileUrl' rel='author' title='author profile'>
<data:post.author/>
</a>
</span>
<b:else/>
<span class='fn'><data:post.author/></span>
</b:if>
</b:if>
</span>
<span class='post-timestamp'>
<b:if cond='data:top.showTimestamp'>
<data:top.timestampLabel/>
<b:if cond='data:post.url'>
<a class='timestamp-link' expr:href='data:post.url' rel='bookmark' title='permanent link'><abbr class='published' expr:title='data:post.timestampISO8601'><data:post.timestamp/></abbr></a>
</b:if>
</b:if>
</span>
<span class='post-comment-link'>
<b:if cond='data:blog.pageType != "item"'>
<b:if cond='data:blog.pageType != "static_page"'>
<b:if cond='data:post.allowComments'>
<a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><b:if cond='data:post.numComments == 1'>1 <data:top.commentLabel/><b:else/><data:post.numComments/> <data:top.commentLabelPlural/></b:if></a>
</b:if>
</b:if>
</b:if>
</span>
</div>
<div class='post-footer-line post-footer-line-2'>
<b:if cond='data:top.showMobileShare'>
<div class='mobile-link-button goog-inline-block' id='mobile-share-button'>
<a href='javascript:void(0);'><data:shareMsg/></a>
</div>
</b:if>
<b:if cond='data:top.showDummy'>
<div class='goog-inline-block dummy-container'><data:post.dummyTag/></div>
</b:if>
</div>
</div>
</div>
<b:if cond='data:blog.pageType == "static_page"'>
<b:if cond='data:post.showThreadedComments'>
<b:include data='post' name='threaded_comments'/>
<b:else/>
<b:include data='post' name='comments'/>
</b:if>
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<b:if cond='data:post.showThreadedComments'>
<b:include data='post' name='threaded_comments'/>
<b:else/>
<b:include data='post' name='comments'/>
</b:if>
</b:if>
</div>
</div>
</div>
</b:includable>
<b:includable id='postQuickEdit' var='post'>
<b:if cond='data:post.editUrl'>
<span expr:class='"item-control " + data:post.adminClass'>
<a expr:href='data:post.editUrl' expr:title='data:top.editPostMsg'>
<img alt='' class='icon-action' height='18' src='http://img2.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/>
</a>
</span>
</b:if>
</b:includable>
<b:includable id='main' var='top'>
<b:if cond='data:mobile == "false"'>
<!-- posts -->
<div class='blog-posts hfeed'>
<b:include data='top' name='status-message'/>
<data:defaultAdStart/>
<b:loop values='data:posts' var='post'>
<b:if cond='data:post.isDateStart'>
<b:if cond='data:post.isFirstPost == "false"'>
</div></div>
</b:if>
</b:if>
<b:if cond='data:post.isDateStart'>
<div class="date-outer">
</b:if>
<b:if cond='data:post.dateHeader'>
<h2 class='date-header'><span><data:post.dateHeader/></span></h2>
</b:if>
<b:if cond='data:post.isDateStart'>
<div class="date-posts">
</b:if>
<div class='post-outer'>
<b:include data='post' name='post'/>
<b:if cond='data:blog.pageType == "static_page"'>
<b:if cond='data:post.showThreadedComments'>
<b:include data='post' name='threaded_comments'/>
<b:else/>
<b:include data='post' name='comments'/>
</b:if>
</b:if>
<b:if cond='data:blog.pageType == "item"'>
<b:if cond='data:post.showThreadedComments'>
<b:include data='post' name='threaded_comments'/>
<b:else/>
<b:include data='post' name='comments'/>
</b:if>
</b:if>
</div>
<b:if cond='data:post.includeAd'>
<b:if cond='data:post.isFirstPost'>
<data:defaultAdEnd/>
<b:else/>
<data:adEnd/>
</b:if>
<div class='inline-ad'>
<data:adCode/>
</div>
<data:adStart/>
</b:if>
</b:loop>
<b:if cond='data:numPosts != 0'>
</div></div>
</b:if>
<data:adEnd/>
</div>
<div style='clear: both;'/>
<b:if cond='data:blog.pageType != "item"'>
<!-- navigation -->
<b:include name='nextprev'/>
</b:if>
<!-- feed links -->
<b:include name='feedLinks'/>
<b:if cond='data:top.showStars'>
<script src='//www.google.com/jsapi' type='text/javascript'/>
<script type='text/javascript'>
google.load("annotations", "1", {"locale": "<data:top.languageCode/>"});
function initialize() {
google.annotations.setApplicationId(<data:top.blogspotReviews/>);
google.annotations.createAll();
google.annotations.fetch();
}
google.setOnLoadCallback(initialize);
</script>
</b:if>
<b:else/>
<b:include name='mobile-main'/>
</b:if>
<b:if cond='data:top.showDummy'>
<data:top.dummyBootstrap/>
</b:if>
</b:includable>
<b:includable id='commentDeleteIcon' var='comment'>
<span expr:class='"item-control " + data:comment.adminClass'>
<b:if cond='data:showCmtPopup'>
<div class='goog-toggle-button'>
<div class='goog-inline-block comment-action-icon'/>
</div>
<b:else/>
<a class='comment-delete' expr:href='data:comment.deleteUrl' expr:title='data:top.deleteCommentMsg'>
<img src='//www.blogger.com/img/icon_delete13.gif'/>
</a>
</b:if>
</span>
</b:includable>
<b:includable id='feedLinks'>
<b:if cond='data:blog.pageType != "item"'> <!-- Blog feed links -->
<b:if cond='data:feedLinks'>
<div class='blog-feeds'>
<b:include data='feedLinks' name='feedLinksBody'/>
</div>
</b:if>
<b:else/> <!--Post feed links -->
<div class='post-feeds'>
<b:loop values='data:posts' var='post'>
<b:if cond='data:post.allowComments'>
<b:if cond='data:post.feedLinks'>
<b:include data='post.feedLinks' name='feedLinksBody'/>
</b:if>
</b:if>
</b:loop>
</div>
</b:if>
</b:includable>
<b:includable id='threaded-comment-form' var='post'>
<div class='comment-form'>
<a name='comment-form'/>
<b:if cond='data:mobile'>
<p><data:blogCommentMessage/></p>
<data:blogTeamBlogMessage/>
<a expr:href='data:post.commentFormIframeSrc' id='comment-editor-src'/>
<iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410' id='comment-editor' name='comment-editor' src='' style='display: none' width='100%'/>
<b:else/>
<p><data:blogCommentMessage/></p>
<data:blogTeamBlogMessage/>
<a expr:href='data:post.commentFormIframeSrc' id='comment-editor-src'/>
<iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410' id='comment-editor' name='comment-editor' src='' width='100%'/>
</b:if>
<data:post.friendConnectJs/>
<data:post.cmtfpIframe/>
<script type='text/javascript'>
BLOG_CMT_createIframe('<data:post.appRpcRelayPath/>', '<data:post.communityId/>');
</script>
</div>
</b:includable>
<b:includable id='mobile-index-post' var='post'>
<div class='mobile-date-outer date-outer'>
<b:if cond='data:post.dateHeader'>
<div class='date-header'>
<span><data:post.dateHeader/></span>
</div>
</b:if>
<div class='mobile-post-outer'>
<a expr:href='data:post.url'>
<h3 class='mobile-index-title entry-title'>
<data:post.title/>
</h3>
<div class='mobile-index-arrow'>›</div>
<div class='mobile-index-contents'>
<b:if cond='data:post.thumbnailUrl'>
<div class='mobile-index-thumbnail'>
<div class='Image'>
<img expr:src='data:post.thumbnailUrl'/>
</div>
</div>
</b:if>
<div class='post-body'>
<b:if cond='data:post.snippet'><data:post.snippet/></b:if>
</div>
</div>
<div style='clear: both;'/>
</a>
<div class='mobile-index-comment'>
<b:if cond='data:blog.pageType != "static_page"'>
<b:if cond='data:post.allowComments'>
<b:if cond='data:post.numComments != 0'>
<a class='comment-link' expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><b:if cond='data:post.numComments == 1'>1 <data:top.commentLabel/><b:else/><data:post.numComments/> <data:top.commentLabelPlural/></b:if></a>
</b:if>
</b:if>
</b:if>
</div>
</div>
</div>
</b:includable>
<b:includable id='feedLinksBody' var='links'>
<div class='feed-links'>
<data:feedLinksMsg/>
<b:loop values='data:links' var='f'>
<a class='feed-link' expr:href='data:f.url' expr:type='data:f.mimeType' target='_blank'><data:f.name/> (<data:f.feedType/>)</a>
</b:loop>
</div>
</b:includable>
<b:includable id='iframe_comments' var='post'>
<b:if cond='data:post.allowComments'>
<script expr:src='data:post.commentSrc' type='text/javascript'/>
<div class='cmt_iframe_holder'/>
<b:if cond='data:post.embedCommentForm == "false"'>
<a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><data:postCommentMsg/></a>
</b:if>
</b:if>
</b:includable>
<b:includable id='comments' var='post'>
<div class='comments' id='comments'>
<a name='comments'/>
<b:if cond='data:post.allowComments'>
<h4>
<b:if cond='data:post.numComments == 1'>
1 <data:commentLabel/>:
<b:else/>
<data:post.numComments/> <data:commentLabelPlural/>:
</b:if>
</h4>
<b:if cond='data:post.commentPagingRequired'>
<span class='paging-control-container'>
<a expr:class='data:post.oldLinkClass' expr:href='data:post.oldestLinkUrl'><data:post.oldestLinkText/></a>
 
<a expr:class='data:post.oldLinkClass' expr:href='data:post.olderLinkUrl'><data:post.olderLinkText/></a>
 
<data:post.commentRangeText/>
 
<a expr:class='data:post.newLinkClass' expr:href='data:post.newerLinkUrl'><data:post.newerLinkText/></a>
 
<a expr:class='data:post.newLinkClass' expr:href='data:post.newestLinkUrl'><data:post.newestLinkText/></a>
</span>
</b:if>
<div expr:id='data:widget.instanceId + "_comments-block-wrapper"'>
<dl expr:class='data:post.avatarIndentClass' id='comments-block'>
<b:loop values='data:post.comments' var='comment'>
<dt expr:class='"comment-author " + data:comment.authorClass' expr:id='data:comment.anchorName'>
<b:if cond='data:comment.favicon'>
<img expr:src='data:comment.favicon' height='16px' style='margin-bottom:-2px;' width='16px'/>
</b:if>
<a expr:name='data:comment.anchorName'/>
<b:if cond='data:blog.enabledCommentProfileImages'>
<data:comment.authorAvatarImage/>
</b:if>
<b:if cond='data:comment.authorUrl'>
<a expr:href='data:comment.authorUrl' rel='nofollow'><data:comment.author/></a>
<b:else/>
<data:comment.author/>
</b:if>
<data:commentPostedByMsg/>
</dt>
<dd class='comment-body' expr:id='data:widget.instanceId + data:comment.cmtBodyIdPostfix'>
<b:if cond='data:comment.isDeleted'>
<span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p>
<data:comment.body/>
</p>
</b:if>
</dd>
<dd class='comment-footer'>
<span class='comment-timestamp'>
<a expr:href='data:comment.url' title='comment permalink'>
<data:comment.timestamp/>
</a>
<b:include data='comment' name='commentDeleteIcon'/>
</span>
</dd>
</b:loop>
</dl>
</div>
<b:if cond='data:post.commentPagingRequired'>
<span class='paging-control-container'>
<a expr:class='data:post.oldLinkClass' expr:href='data:post.oldestLinkUrl'>
<data:post.oldestLinkText/>
</a>
<a expr:class='data:post.oldLinkClass' expr:href='data:post.olderLinkUrl'>
<data:post.olderLinkText/>
</a>
 
<data:post.commentRangeText/>
 
<a expr:class='data:post.newLinkClass' expr:href='data:post.newerLinkUrl'>
<data:post.newerLinkText/>
</a>
<a expr:class='data:post.newLinkClass' expr:href='data:post.newestLinkUrl'>
<data:post.newestLinkText/>
</a>
</span>
</b:if>
<p class='comment-footer'>
<b:if cond='data:post.embedCommentForm'>
<b:if cond='data:post.allowNewComments'>
<b:include data='post' name='comment-form'/>
<b:else/>
<data:post.noNewCommentsText/>
</b:if>
<b:else/>
<b:if cond='data:post.allowComments'>
<a expr:href='data:post.addCommentUrl' expr:onclick='data:post.addCommentOnclick'><data:postCommentMsg/></a>
</b:if>
</b:if>
</p>
</b:if>
<b:if cond='data:showCmtPopup'>
<div id='comment-popup'>
<iframe allowtransparency='true' frameborder='0' id='comment-actions' name='comment-actions' scrolling='no'>
</iframe>
</div>
</b:if>
<div id='backlinks-container'>
<div expr:id='data:widget.instanceId + "_backlinks-container"'>
<b:if cond='data:post.showBacklinks'>
<b:include data='post' name='backlinks'/>
</b:if>
</div>
</div>
</div>
</b:includable>
</b:widget>
</b:section>
</div>
<div id='right'>
<!-- Sidebar widgets -->
<div class='sidebar'>
<b:section class='sidebartop' id='sidebartop' preferred='yes'>
<b:widget id='HTML1' locked='false' title='' type='HTML'>
<b:includable id='main'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:includable>
</b:widget>
<b:widget id='PopularPosts1' locked='false' title='Popular Posts' type='PopularPosts'>
<b:includable id='main'>
<b:if cond='data:title'><h2><data:title/></h2></b:if>
<div class='widget-content popular-posts'>
<ul>
<b:loop values='data:posts' var='post'>
<li>
<b:if cond='data:showThumbnails == "false"'>
<b:if cond='data:showSnippets == "false"'>
<!-- (1) No snippet/thumbnail -->
<a expr:href='data:post.href'><data:post.title/></a>
<b:else/>
<!-- (2) Show only snippets -->
<div class='item-title'><a expr:href='data:post.href'><data:post.title/></a></div>
<div class='item-snippet'><data:post.snippet/></div>
</b:if>
<b:else/>
<b:if cond='data:showSnippets == "false"'>
<!-- (3) Show only thumbnails -->
<div class='item-thumbnail-only'>
<b:if cond='data:post.thumbnail'>
<div class='item-thumbnail'>
<a expr:href='data:post.href' target='_blank'>
<img alt='' border='0' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:width='data:thumbnailSize'/>
</a>
</div>
</b:if>
<div class='item-title'><a expr:href='data:post.href'><data:post.title/></a></div>
</div>
<div style='clear: both;'/>
<b:else/>
<!-- (4) Show snippets and thumbnails -->
<div class='item-content'>
<b:if cond='data:post.thumbnail'>
<div class='item-thumbnail'>
<a expr:href='data:post.href' target='_blank'>
<img alt='' border='0' expr:height='data:thumbnailSize' expr:src='data:post.thumbnail' expr:width='data:thumbnailSize'/>
</a>
</div>
</b:if>
<div class='item-title'><a expr:href='data:post.href'><data:post.title/></a></div>
<div class='item-snippet'><data:post.snippet/></div>
</div>
<div style='clear: both;'/>
</b:if>
</b:if>
</li>
</b:loop>
</ul>
<b:include name='quickedit'/>
</div>
</b:includable>
</b:widget>
<b:widget id='HTML5' locked='false' title='Blogger templates' type='HTML'>
<b:includable id='main'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:includable>
</b:widget>
</b:section>
</div>
<div class='clear'/>
</div>
<div class='clear'/>
</div>
<div id='bottom'>
<ul>
<li class='botwid'>
<b:section class='footersec' id='footersec1' showaddelement='yes'>
<b:widget id='HTML4' locked='false' title='Blogger news' type='HTML'>
<b:includable id='main'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:includable>
</b:widget>
</b:section>
</li>
<li class='botwid'>
<b:section class='footersec' id='footersec2' showaddelement='yes'>
<b:widget id='HTML3' locked='false' title='Blogroll' type='HTML'>
<b:includable id='main'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:includable>
</b:widget>
</b:section>
</li>
<li class='botwid'>
<b:section class='footersec' id='footersec3' showaddelement='yes'>
<b:widget id='HTML2' locked='false' title='About' type='HTML'>
<b:includable id='main'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
</b:if>
<div class='widget-content'>
<data:content/>
</div>
<b:include name='quickedit'/>
</b:includable>
</b:widget>
</b:section>
</li>
</ul>
<div class='clear'/>
</div>
<div id='footer'>
<div class='fcred'>
Copyright 2012 <a expr:href='data:blog.homepageUrl'><data:blog.title/></a> | Powered by <a href='http://www.blogger.com/'>Blogger</a>
<br/>Design by <a href='http://www.web2feel.com/' target='_blank'>Web2feel</a> | Blogger Template by <a href='http://newbloggerthemes.com/' target='_blank' title='Best Blogger Templates'>NewBloggerThemes.com</a>
</div>
<div class='clear'/>
</div>
<div class='clear'/>
</div>
</body>
</html>