$(function () {
$(".weixin img").hide();
$(".weixin").hover(function () { $(this).find("img").fadeIn(); }, function () { $(this).find("img").fadeOut(); });
})
$(function () {
$("#kinMaxShow").kinMaxShow({ height:757, button: { normal: { right: '47%', borderRadius: '10px', background: "#ffffff", border: "0" }, focus: { borderRadius: '10px', background: "#1392fd", border: "1px", color: "#1392fd" } } });
})
$(function(jQuery){
$.fn.BreakingNews = function(settings){
var defaults={
background :'#333',
title :'NEWS',
titlecolor :'#FFF',
titlebgcolor :'#5aa628',
linkcolor :'#ccc',
linkhovercolor :'#5aa628',
fonttextsize :16,
isbold :false,
border :'none',
width :'100%',
autoplay :true,
timer :3000,
modulid :'brekingnews',
effect :'fade' //or slide
};
var settings=$.extend(defaults,settings);
return this.each(function(){
settings.modulid="#"+$(this).attr("id");
var timername=settings.modulid;
var activenewsid=1;
if (settings.isbold==true)
fontw='bold';
else
fontw='normal';
if (settings.effect=='slide')
$(settings.modulid+' ul li').css({'display':'block'});
else
$(settings.modulid+' ul li').css({'display':'none'});
$(settings.modulid+' .bn-title').html(settings.title);
$(settings.modulid).css({'width':settings.width, 'background':settings.background, 'border':settings.border, 'font-size':settings.fonttextsize });
$(settings.modulid+' ul').css({'left':$(settings.modulid+' .bn-title').width()+10});
$(settings.modulid+' .bn-title').css({'background':settings.titlebgcolor,'color':settings.titlecolor,'font-weight':fontw});
$(settings.modulid+' ul li a').css({'color':settings.linkcolor,'font-weight':fontw,'height':parseInt(settings.fonttextsize)+6});
$(settings.modulid+' ul li').eq( parseInt(activenewsid-1) ).css({'display':'block'});
// Links hover events ......
$(settings.modulid+' ul li a').hover(function()
{
$(this).css({'color':settings.linkhovercolor});
},
function ()
{
$(this).css({'color':settings.linkcolor});
}
);
// Arrows Click Events ......
$(settings.modulid+' .bn-arrows span').click(function(e) {
if ( $(this).attr('class')=="bn-arrows-left" )
BnAutoPlay('prev');
else
BnAutoPlay('next');
});
// Timer events ...............
if (settings.autoplay==true)
{
timername=setInterval(function(){BnAutoPlay('next')},settings.timer);
$(settings.modulid).hover(function()
{
clearInterval(timername);
},
function()
{
timername=setInterval(function(){BnAutoPlay('next')},settings.timer);
}
);
}
else
{
clearInterval(timername);
}
//timer and click events function ...........
function BnAutoPlay(pos)
{
if ( pos=="next" )
{
if ( $(settings.modulid+' ul li').length>activenewsid )
activenewsid++;
else
activenewsid=1;
}
else
{
if (activenewsid-2==-1)
activenewsid=$(settings.modulid+' ul li').length;
else
activenewsid=activenewsid-1;
}
if (settings.effect=='fade')
{
$(settings.modulid+' ul li').css({'display':'none'});
$(settings.modulid+' ul li').eq( parseInt(activenewsid-1) ).fadeIn();
}
else
{
$(settings.modulid+' ul').animate({'marginTop':-($(settings.modulid+' ul li').height()+40)*(activenewsid-1)});
}
}
// links size calgulating function ...........
$(window).resize(function(e) {
if ( $(settings.modulid).width()<360 )
{
$(settings.modulid+' .bn-title').html(' ');
$(settings.modulid+' .bn-title').css({ 'width':'4px'});
$(settings.modulid+' ul').css({'left':4});
}else
{
$(settings.modulid+' .bn-title').html(settings.title);
$(settings.modulid+' .bn-title').css({ 'width':'auto'});
$(settings.modulid+' ul').css({'left':$(settings.modulid+' .bn-title').width()+40});
}
});
});
};
});
/*
* Lightcase - jQuery Plugin
* @version 1.5.4 (02/11/2014)
*/
;(function ($) {
window.lightcase = {
cache : {},
support : {},
labels : {
'errorMessage' : 'Source could not be found...',
'sequenceInfo.of' : ' of ',
'close' : 'Close',
'navigator.prev' : 'Prev',
'navigator.next' : 'Next',
'navigator.play' : 'Play',
'navigator.pause' : 'Pause'
},
/**
* Initializes the plugin
*
* @param {object} options
* @return {object}
*/
init : function (options) {
return this.each(function () {
$(this).unbind('click').click(function (event) {
event.preventDefault();
$(this).lightcase('start', options);
});
});
},
/**
* Starts the plugin
*
* @param {object} options
* @return {void}
*/
start : function (options) {
lightcase.settings = $.extend({
idPrefix : 'lightcase-',
classPrefix : 'lightcase-',
transition : 'elastic',
transitionIn : null,
transitionOut : null,
cssTransitions : true,
speedIn : 350,
speedOut : 250,
maxWidth : 1000,
maxHeight : 800,
forceWidth : false,
forceHeight : false,
liveResize : true,
fullScreenModeForMobile : true,
mobileMatchExpression : /(iphone|ipod|ipad|android|blackberry|symbian)/,
disableShrink : false,
shrinkFactor : .75,
overlayOpacity : .9,
slideshow : false,
timeout : 1000000000,
swipe : false,
useKeys : true,
navigateEndless : false,
closeOnOverlayClick : true,
showTitle : false,
showCaption : false,
showSequenceInfo : false,
inline : {
width : 'auto',
height : 'auto'
},
ajax : {
width : 'auto',
height : 'auto',
type : 'get',
dataType : 'html',
data : {}
},
iframe : {
width : 500,
height : 500,
frameborder : 0
},
flash : {
width : 400,
height : 205,
wmode : 'transparent'
},
video : {
width : 800,
height : 480,
poster : '',
preload : 'auto',
controls : true,
autobuffer : true,
autoplay : true,
loop : false
},
type : null,
typeMapping : {
'image' : 'jpg,jpeg,gif,png,bmp',
'flash' : 'swf',
'video' : 'mp4,mov,ogv,ogg,webm',
'iframe' : 'html,php',
'ajax' : 'txt',
'inline' : '#'
},
errorMessage : function () {
return '
' + lightcase.labels['errorMessage'] + '
';
},
markup : function () {
$('body').append(
$overlay = $(''),
$loading = $(''),
$case = $('')
);
$case.append(
$content = $(''),
$info = $(''),
$close = $('' + lightcase.labels['close'] + '')
);
$info.append(
$sequenceInfo = $(''),
$title = $(''),
$caption = $('')
);
$content.append(
$contentInner = $(''),
$nav = $('')
);
$nav.append(
$prev = $('' + lightcase.labels['navigator.prev'] + '').hide(),
$next = $('' + lightcase.labels['navigator.next'] + '').hide(),
$play = $('' + lightcase.labels['navigator.play'] + '').hide(),
$pause = $('' + lightcase.labels['navigator.pause'] + '').hide()
);
},
onInit : function () {},
onStart : function () {},
onFinish : function () {}
}, options);
lightcase.objectData = lightcase.getObjectData(this);
lightcase.dimensions = lightcase.getDimensions();
// Call hook function on initialization
lightcase.settings.onInit();
lightcase.addElements();
lightcase.lightcaseOpen();
},
/**
* Gets the object data
*
* @param {object} $object
* @return {object} objectData
*/
getObjectData : function ($object) {
var objectData = {
$link : $object,
title : $object.attr('title'),
caption : $object.children('img').attr('alt'),
url : lightcase.verifyDataUrl($object.attr('data-href') || $object.attr('href')),
requestType : lightcase.settings.ajax.type,
requestData : lightcase.settings.ajax.data,
responseDataType : lightcase.settings.ajax.dataType,
rel : $object.attr('data-rel'),
type : lightcase.settings.type || lightcase.verifyDataType($object.attr('data-href') || $object.attr('href')),
isPartOfSequence : lightcase.isPartOfSequence($object.attr('data-rel'), ':'),
isPartOfSequenceWithSlideshow : lightcase.isPartOfSequence($object.attr('data-rel'), ':slideshow'),
currentIndex : $('[data-rel="' + $object.attr('data-rel') + '"]').index($object),
sequenceLength : $('[data-rel="' + $object.attr('data-rel') + '"]').length
};
// Add sequence info to objectData
objectData.sequenceInfo = (objectData.currentIndex + 1) + lightcase.labels['sequenceInfo.of'] + objectData.sequenceLength;
return objectData;
},
/**
* Verifies if the link is part of a sequence
*
* @param {string} rel
* @param {string} expression
* @return {boolean}
*/
isPartOfSequence : function (rel, expression) {
var getSimilarLinks = $('[data-rel="' + rel + '"]'),
regexp = new RegExp(expression);
if (regexp.test(rel) && getSimilarLinks.length > 1) {
return true;
} else {
return false;
}
},
/**
* Verifies if the slideshow should be enabled
*
* @return {boolean}
*/
isSlideshowEnabled : function () {
if (lightcase.objectData.isPartOfSequence && (lightcase.settings.slideshow === true || lightcase.objectData.isPartOfSequenceWithSlideshow === true)) {
return true;
} else {
return false;
}
},
/**
* Loads the new content to show
*
* @return {void}
*/
loadContent : function () {
if (lightcase.cache.originalObject) {
lightcase.restoreObject();
}
lightcase.createObject();
},
/**
* Creates a new object
*
* @return {void}
*/
createObject : function () {
var $object;
// Create object
switch (lightcase.objectData.type) {
case 'image' :
$object = $(new Image());
$object.attr({
// The time expression is required to prevent the binding of an image load
'src' : lightcase.objectData.url + '?random=' + (new Date()).getTime(),
'alt' : lightcase.objectData.title
});
break;
case 'inline' :
$object = $('');
$object.html(lightcase.cloneObject($(lightcase.objectData.url)));
// Add custom attributes from lightcase.settings
$.each(lightcase.settings.inline, function (name, value) {
$object.attr('data-' + name, value);
});
break;
case 'ajax' :
$object = $('');
// Add custom attributes from lightcase.settings
$.each(lightcase.settings.ajax, function (name, value) {
if (name !== 'data') {
$object.attr('data-' + name, value);
}
});
break;
case 'flash' :
$object = $('